mediawiki-extensions-InputBox/Gruntfile.js
James D. Forrester fbd1c68323 build: Use conf.MessageDirs for banana path config
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
2023-09-18 19:48:24 +01:00

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