mirror of
https://github.com/videojs/video.js.git
synced 2024-12-27 02:43:45 +02:00
update gruntfile to pass jshint
This commit is contained in:
parent
51a22adc6a
commit
5f2b8fb831
24
Gruntfile.js
24
Gruntfile.js
@ -14,9 +14,9 @@ module.exports = function(grunt) {
|
|||||||
// npm install https://github.com/gruntjs/grunt-contrib-jshint/archive/7fd70e86c5a8d489095fa81589d95dccb8eb3a46.tar.gz
|
// npm install https://github.com/gruntjs/grunt-contrib-jshint/archive/7fd70e86c5a8d489095fa81589d95dccb8eb3a46.tar.gz
|
||||||
jshint: {
|
jshint: {
|
||||||
src: {
|
src: {
|
||||||
src: ["src/js/*.js", "Gruntfile.js", "test/unit/*.js"],
|
src: ['src/js/*.js', 'Gruntfile.js', 'test/unit/*.js'],
|
||||||
options: {
|
options: {
|
||||||
jshintrc: ".jshintrc"
|
jshintrc: '.jshintrc'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -39,8 +39,8 @@ module.exports = function(grunt) {
|
|||||||
minified: ['test/minified.html']
|
minified: ['test/minified.html']
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
files: [ "src/**/*.js", "test/unit/*.js" ],
|
files: [ 'src/**/*.js', 'test/unit/*.js' ],
|
||||||
tasks: "dev"
|
tasks: 'dev'
|
||||||
}
|
}
|
||||||
// Copy is broken. Waiting for an update to use.
|
// Copy is broken. Waiting for an update to use.
|
||||||
// copy: {
|
// copy: {
|
||||||
@ -55,11 +55,11 @@ module.exports = function(grunt) {
|
|||||||
// },
|
// },
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.loadNpmTasks("grunt-contrib-jshint");
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
grunt.loadNpmTasks("grunt-contrib-qunit");
|
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||||
grunt.loadNpmTasks("grunt-contrib-watch");
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks("grunt-contrib-clean");
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||||
grunt.loadNpmTasks("grunt-contrib-copy");
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
|
|
||||||
// Default task.
|
// Default task.
|
||||||
grunt.registerTask('default', ['jshint', 'build', 'minify', 'dist']);
|
grunt.registerTask('default', ['jshint', 'build', 'minify', 'dist']);
|
||||||
@ -86,10 +86,10 @@ module.exports = function(grunt) {
|
|||||||
path:['src/js/'],
|
path:['src/js/'],
|
||||||
dep:[],
|
dep:[],
|
||||||
exclude:[],
|
exclude:[],
|
||||||
output_mode:'list',
|
output_mode:'list'
|
||||||
}, function(err,results){
|
}, function(err,results){
|
||||||
if (err) {
|
if (err) {
|
||||||
grunt.warn({ message: err })
|
grunt.warn({ message: err });
|
||||||
grunt.log.writeln(err);
|
grunt.log.writeln(err);
|
||||||
done(false);
|
done(false);
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ module.exports = function(grunt) {
|
|||||||
grunt.file.write(dest, '');
|
grunt.file.write(dest, '');
|
||||||
|
|
||||||
if (this.data.sourcelist) {
|
if (this.data.sourcelist) {
|
||||||
files = files.concat(grunt.file.read(this.data.sourcelist).split(','))
|
files = files.concat(grunt.file.read(this.data.sourcelist).split(','));
|
||||||
}
|
}
|
||||||
if (this.file.src) {
|
if (this.file.src) {
|
||||||
files = files.concat(this.file.src);
|
files = files.concat(this.file.src);
|
||||||
|
Loading…
Reference in New Issue
Block a user