mediawiki-extensions-Syntax.../Gruntfile.js
Ed Sanders 7e344532c0 build: Update devDependencies
Change-Id: I60680de345c39a365b58c016a49c0e7ea11510be
2019-07-31 16:45:14 +01:00

49 lines
944 B
JavaScript

/*!
* Grunt file
*
* @package SyntaxHighlight_GeSHi
*/
/* eslint-env node, es6 */
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,json}',
'!{vendor,node_modules}/**'
]
},
stylelint: {
all: [
'**/*.css',
'!**/*.generated.css',
'!vendor/**',
'!node_modules/**'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};