mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 13:56:53 +00:00
97c134e397
Also: Add license (MIT). Change-Id: Ia184b396b648ecb4ef30b40d13618e2ecf72294a
57 lines
1 KiB
JavaScript
57 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/**'
|
|
]
|
|
},
|
|
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' );
|
|
};
|