mediawiki-extensions-Templa.../Gruntfile.js
Thiemo Kreuz f92fed31c7 Turn all TemplateData .css files into .less files
This patch intentionally doesn't do anything else. Later patches will
make use of LESS features.

Change-Id: I7ce7fdba12aa9f5fb49a752706b83f831632bed6
2022-08-08 15:29:03 +02:00

51 lines
945 B
JavaScript

/*!
* Grunt file
*
* @package TemplateData
*/
'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: [
'**/*.{js,json}',
'!{lib,vendor,node_modules,docs}/**'
]
},
stylelint: {
all: [
'modules/**/*.{css,less}'
]
},
banana: {
options: {
requireLowerCase: false
},
all: conf.MessagesDirs.TemplateData
},
watch: {
files: [
'.{stylelintrc,eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};