mediawiki-extensions-Cookie.../Gruntfile.js
Umherirrender d973bb7a7b build: Always exclude vendor and node_modules
Change-Id: Icc4f36c64da5836957289f4985f131b1dc09b1b3
2017-11-10 20:23:27 +01:00

58 lines
1 KiB
JavaScript

/*!
* Grunt file
*
* @package CookieWarning
*/
/*jshint node:true */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.initConfig( {
banana: conf.MessagesDirs,
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
},
jshint: {
options: {
jshintrc: true
},
all: [
'*.js',
'modules/**/*.js'
]
},
jscs: {
fix: {
options: {
fix: true
},
src: '<%= jshint.all %>'
},
main: {
src: '<%= jshint.all %>'
}
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
all: 'resources/**/*.css'
}
} );
grunt.registerTask( 'lint', [ 'jshint', 'jscs:main', 'csslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'lint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};