mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-11 16:59:25 +00:00
68c4348935
Change-Id: I4510c552189ae7b0f458cb82f389dff7f14a0a96
48 lines
927 B
JavaScript
48 lines
927 B
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package TemplateData
|
|
*/
|
|
|
|
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
reportUnusedDisableDirectives: true,
|
|
extensions: [ '.js', '.json' ],
|
|
cache: true
|
|
},
|
|
all: [
|
|
'**/*.js{,on}',
|
|
'!{lib,vendor,node_modules}/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
all: [
|
|
'modules/*.css',
|
|
'resources/*.css'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
watch: {
|
|
files: [
|
|
'.{stylelintrc,eslintrc}.json',
|
|
'<%= eslint.all %>',
|
|
'<%= stylelint.all %>'
|
|
],
|
|
tasks: 'test'
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|