mediawiki-extensions-Syntax.../Gruntfile.js
Ed Sanders 3878e424b1 Mark es6 file as such
Change-Id: I981ac80d93c81a2256c6bc5e519e653c8400d63b
2018-01-11 14:46:17 +01:00

53 lines
982 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-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
all: [
'*.js',
'modules/**/*.js'
]
},
jsonlint: {
all: [
'*.json',
'i18n/*.json',
'modules/**/*.json'
]
},
stylelint: {
all: [
'**/*.css',
'!**/*.generated.css',
'!vendor/**',
'!node_modules/**'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'<%= eslint.all %>',
'<%= jsonlint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};