mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-28 00:01:10 +00:00
b5f6be3ca9
* eslint-config-wikimedia: 0.14.3 → 0.15.0 * grunt-stylelint: 0.11.1 → 0.13.0 * stylelint-config-wikimedia: 0.6.0 → 0.8.0 Additional changes: * Also sorted "composer fix" command to run phpcbf last. * Removing manual reportUnusedDisableDirectives for eslint. Change-Id: I26e6206daaef4d2b7e2966ffef3a49c81b9b6f8f
48 lines
903 B
JavaScript
48 lines
903 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: {
|
|
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' );
|
|
};
|