mediawiki-extensions-Syntax.../Gruntfile.js
Umherirrender 8bbbdb1eda Use json extension for .stylelintrc
Bug: T173516
Change-Id: Ia7982e756f6cc8c8c6183b6bb55621501cbddacb
2017-08-19 10:30:45 +02:00

53 lines
977 B
JavaScript

/*!
* Grunt file
*
* @package SyntaxHighlight_GeSHi
*/
/* 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-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' );
};