diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-03-09 17:58:34 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-03-09 17:58:34 +0100 |
commit | 9fd5e7a153edb3dd5c060f7e6faad80c12120535 (patch) | |
tree | 497b548dda010cbcebfa0f0b8ecbaf5a1a8a2427 | |
parent | 19088fa91ece3b86550f9f63c1094ca96144c13e (diff) | |
download | jquery-ui-9fd5e7a153edb3dd5c060f7e6faad80c12120535.tar.gz jquery-ui-9fd5e7a153edb3dd5c060f7e6faad80c12120535.zip |
Build/grunt: Improve lint setup, configure options and globals for different contexts
-rw-r--r-- | grunt.js | 42 |
1 files changed, 35 insertions, 7 deletions
@@ -217,8 +217,9 @@ config.init({ }) }, lint: { - // TODO extend this to tests - files: ['ui/*'] + ui: 'ui/*', + grunt: 'grunt.js', + tests: 'tests/unit/**/*.js' }, jshint: { options: { @@ -230,11 +231,38 @@ config.init({ noarg: true, sub: true, undef: true, - eqnull: true, - browser: true + eqnull: true }, - globals: { - jQuery: true + grunt: { + options: { + node: true + }, + globals: { + file: true, + log: true, + template: true + } + }, + ui: { + options: { + browser: true + }, + globals: { + jQuery: true + } + }, + tests: { + options: { + jquery: true + }, + globals: { + module: true, + test: true, + ok: true, + equal: true, + deepEqual: true, + QUnit: true + } } } }); @@ -255,7 +283,7 @@ task.registerBasicTask('copy', 'Copy files to destination folder and replace @VE var target = data.dest + '/'; var strip = data.strip; if (typeof strip === 'string') { - strip = new RegExp('^' + template.process(strip, config()).replace(/[-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")); + strip = new RegExp('^' + template.process(strip, config()).replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")); } files.forEach(function(fileName) { var targetFile = strip ? fileName.replace(strip, '') : fileName; |