Created
August 17, 2012 20:00
-
-
Save sprice/3382068 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global desc, task, jake, fail, complete */ | |
(function() { | |
"use strict"; | |
desc("Build"); | |
task("default", ["lint"], function() {}); | |
desc("Lint"); | |
task("lint", [], function() { | |
var lint = require("./build/lint/lint_runner.js"); | |
var files = new jake.FileList(); | |
files.include("*.js"); | |
files.include("*/**/*.js"); | |
files.exclude("libraries/**/*.js"); | |
var options = nodeLintOptions(); | |
var passed = lint.validateFileList(files.toArray(), options, {}); | |
if (!passed) fail("Lint failed."); | |
}); | |
function nodeLintOptions() { | |
return { | |
bitwise: true, | |
curly: false, | |
eqeqeq: true, | |
forin: true, | |
immed: true, | |
latedef: true, | |
newcap: true, | |
noarg: true, | |
noempty: true, | |
nonew: true, | |
regexp: true, | |
undef: true, | |
strict: false, | |
trailing: true, | |
jquery: true, | |
browser: true, | |
node: true, | |
predef: [ | |
"Drupal" | |
] | |
}; | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment