mediawiki-extensions-Thanks/Gruntfile.js
Umherirrender 65b0f8b3b7 build: Add stylelint for less file
Change-Id: I87717cd5f1a2aa55f78174d639fe7ba648837172
2024-04-02 01:31:42 +02:00

46 lines
837 B
JavaScript

/*!
* Grunt file
*
* @package Thanks
*/
'use strict';
module.exports = function ( grunt ) {
const 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: {
cache: true,
fix: grunt.option( 'fix' )
},
all: [ '.' ]
},
banana: conf.MessagesDirs,
stylelint: {
all: [
'**/*.{css,less}',
'!node_modules/**',
'!vendor/**'
]
},
watch: {
files: [
'.{stylelintrc,eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
grunt.registerTask( 'default', 'test' );
};