mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Build/grunt: Improve lint setup, configure options and globals for different contexts
This commit is contained in:
parent
19088fa91e
commit
9fd5e7a153
42
grunt.js
42
grunt.js
@ -217,8 +217,9 @@ config.init({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
lint: {
|
lint: {
|
||||||
// TODO extend this to tests
|
ui: 'ui/*',
|
||||||
files: ['ui/*']
|
grunt: 'grunt.js',
|
||||||
|
tests: 'tests/unit/**/*.js'
|
||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
options: {
|
options: {
|
||||||
@ -230,11 +231,38 @@ config.init({
|
|||||||
noarg: true,
|
noarg: true,
|
||||||
sub: true,
|
sub: true,
|
||||||
undef: true,
|
undef: true,
|
||||||
eqnull: true,
|
eqnull: true
|
||||||
browser: true
|
|
||||||
},
|
},
|
||||||
globals: {
|
grunt: {
|
||||||
jQuery: true
|
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 target = data.dest + '/';
|
||||||
var strip = data.strip;
|
var strip = data.strip;
|
||||||
if (typeof strip === 'string') {
|
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) {
|
files.forEach(function(fileName) {
|
||||||
var targetFile = strip ? fileName.replace(strip, '') : fileName;
|
var targetFile = strip ? fileName.replace(strip, '') : fileName;
|
||||||
|
Loading…
Reference in New Issue
Block a user