mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-15 03:34:10 +00:00
81fa5b0c97
* Uq and Dq was mixed * Simplify regeneration of grammar for node developers * Speed up npm test by ignoring local test json files Change-Id: Iec273dcc967be46d3df52260fc56f1969667e497
42 lines
925 B
JavaScript
42 lines
925 B
JavaScript
'use strict';
|
|
|
|
module.exports = function ( grunt ) {
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
banana: conf.MessagesDirs,
|
|
stylelint: {
|
|
all: [
|
|
'**/*.css',
|
|
'!{vendor,node_modules,modules/ve-math/tools/node_modules}/**'
|
|
]
|
|
},
|
|
watch: {
|
|
files: [
|
|
'.{stylelintrc,.eslintrc}.json',
|
|
'<%= eslint.all %>',
|
|
'<%= stylelint.all %>'
|
|
],
|
|
tasks: 'test'
|
|
},
|
|
eslint: {
|
|
options: {
|
|
cache: true,
|
|
fix: grunt.option( 'fix' )
|
|
},
|
|
all: [
|
|
'**/*.{js,json}',
|
|
'!{vendor,node_modules,modules/ve-math/tools/node_modules,tests/phpunit/unit/TexVC}/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|