mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-28 00:01:10 +00:00
28ad9d7b05
Change-Id: I67aee67060910d73c1d315b9efe6385d3afc0760
49 lines
942 B
JavaScript
49 lines
942 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{,on}',
|
|
'!{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' );
|
|
};
|