mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-30 10:54:53 +00:00
40fb527c59
It relies on PNG mode of Math extension which has been removed since I595926027433182cc03 Bug: T360978 Change-Id: I650d096dfd83c725e30242eb5795236c59fe7883
46 lines
1 KiB
JavaScript
46 lines
1 KiB
JavaScript
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
const messagesDirs = require( './extension.json' ).MessagesDirs;
|
|
for ( const subExtension of [
|
|
'QuestyCaptcha',
|
|
'ReCaptchaNoCaptcha',
|
|
'FancyCaptcha',
|
|
'hCaptcha'
|
|
] ) {
|
|
// eslint-disable-next-line security/detect-non-literal-require
|
|
messagesDirs[ subExtension ] = require( './' + subExtension + '/extension.json' )
|
|
.MessagesDirs[ subExtension ]
|
|
.map( function ( path ) {
|
|
return subExtension + '/' + path;
|
|
} );
|
|
}
|
|
|
|
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: messagesDirs
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|