mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-30 18:34:40 +00:00
6eef4f325b
Adds the jscs and jshint packages for development and their tasks in Grunt. Also fixes all the code convention errors. Change-Id: If1c9dfdbe22d4912d78b6a51b1292866970a85cc
32 lines
612 B
JavaScript
32 lines
612 B
JavaScript
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
|
|
grunt.initConfig( {
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
jscs: {
|
|
src: 'resources/*.js'
|
|
},
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true
|
|
},
|
|
all: [ 'resources/*.js' ]
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|