mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-24 07:23:41 +00:00
5557f7d4ee
SVGO v2.x changed configuration to JS, amending configuration. Adding new 'minify-svg' npm script. Also re-crushing SVGs. Bug: T278656 Change-Id: I71621ebdd0c060a4252780e1ba387d707ac81eab
33 lines
671 B
JavaScript
33 lines
671 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-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
cache: true,
|
|
fix: grunt.option( 'fix' )
|
|
},
|
|
all: [
|
|
'**/*.{js,json}',
|
|
'!{vendor,node_modules}/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
all: [
|
|
'**/*.css',
|
|
'**/*.less',
|
|
'!{vendor,node_modules}/**'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|