Ignore:
Timestamp:
03/14/14 12:36:58 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Enable deployment with Grunt.

Location:
Dev/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11build
        2 quod-erat.git
  • Dev/trunk/node_modules/grunt-coffeelint/tasks/coffeelint.js

    r484 r516  
    44  grunt.registerMultiTask('coffeelint', 'Validate files with CoffeeLint', function() {
    55
     6    var errorCount = 0;
     7    var warnCount = 0;
    68    var files = this.filesSrc;
    79    var options = this.options();
    8     var errorCount = 0;
    9     var warnCount = 0;
     10
     11    if (options.configFile != undefined) {
     12      var config = grunt.file.readJSON(options.configFile);
     13      options.configFile = undefined;
     14      for (var key in options) {
     15          config[key] = options[key];
     16      }
     17      options = config;
     18    }
    1019
    1120    files.forEach(function(file) {
    1221      grunt.verbose.writeln('Linting ' + file + '...');
    1322
    14       var errors = coffeelint.lint(grunt.file.read(file), options);
     23      var literate = !!file.match(/\.(litcoffee|coffee\.md)$/i);
     24      var errors = coffeelint.lint(grunt.file.read(file), options, literate);
    1525
    1626      if (!errors.length) {
     
    4050    });
    4151
    42     if (errorCount) {
     52    if (errorCount && !options.force) {
    4353      return false;
    4454    }
    4555
    46     if (!warnCount) {
    47       grunt.log.ok(files.length + ' file' + (files.length === 1 ? '' : 's') +
    48           ' lint free.');
     56    if (!warnCount && !errorCount) {
     57      grunt.log.ok(files.length + ' file' + (files.length === 1 ? '' : 's') + ' lint free.');
    4958    }
    5059  });
Note: See TracChangeset for help on using the changeset viewer.