mediawiki-extensions-Advanc.../Gruntfile.js
James D. Forrester 5a62261e6a 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: I5969d576a78efb1095f2c8c68a0700b621585b89
2023-09-18 19:40:12 +01:00

35 行
670 B
JavaScript

'use strict';
module.exports = function ( grunt ) {
const conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
options: {
cache: true,
fix: grunt.option( 'fix' )
},
all: [
'**/*.{js,json}',
'!{vendor,node_modules}/**'
]
},
stylelint: {
all: [
'**/*.css',
'**/*.less',
'!node_modules/**',
'!vendor/**'
]
},
banana: conf.MessagesDirs
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};