mediawiki-extensions-Cookie.../Gruntfile.js
Florian 97c134e397 Improve documentation of code and add test features (npm, composer)
Also: Add license (MIT).

Change-Id: Ia184b396b648ecb4ef30b40d13618e2ecf72294a
2016-01-10 19:31:07 +01:00

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' );
};