mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-15 03:34:44 +00:00
f92fed31c7
This patch intentionally doesn't do anything else. Later patches will make use of LESS features. Change-Id: I7ce7fdba12aa9f5fb49a752706b83f831632bed6
51 lines
945 B
JavaScript
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' );
|
|
};
|