mediawiki-extensions-Math/Gruntfile.js
Moritz Schubotz (physikerwelt) 81fa5b0c97
Fix significant typo in grammar
* 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
2022-12-30 16:58:39 +01:00

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' );
};