mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-11 16:49:54 +00:00
fbd1c68323
Rather than configuring manually, re-use the specification in the repo's extension.json file, like we do elsewhere; this way, if we add further i18n files in future, or change their paths, we won't need to update this configuration. Change-Id: I3975959c680a0ba789fe65b80506d3c0ed8a9724
32 lines
635 B
JavaScript
32 lines
635 B
JavaScript
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
cache: true
|
|
},
|
|
all: [
|
|
'**/*.js{,on}',
|
|
'!{lib,vendor,node_modules}/**'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
stylelint: {
|
|
all: [
|
|
'**/*.{css,less}',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|