mediawiki-extensions-Math/Gruntfile.js
Umherirrender 5ecbf750c1 build: Fix exclude of vendor and node_modules in Gruntfile.js
It should exclude vendor in the root, so there should no `**/` be at the
begin.

Change-Id: Ice2c4d16de258dac5506322d6f4551587b8e3022
2019-10-25 17:39:38 +00:00

42 lines
885 B
JavaScript

/* eslint-env node, es6 */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: conf.MessagesDirs,
stylelint: {
all: [
'**/*.css',
'!{vendor,node_modules}/**'
]
},
watch: {
files: [
'.{stylelintrc,.eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
},
eslint: {
options: {
reportUnusedDisableDirectives: true,
extensions: [ '.js', '.json' ],
cache: true
},
all: [
'**/*.{js,json}',
'!{vendor,node_modules}/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};