mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 17:51:00 +00:00
f6ee327a78
Additional changes: * Added the "composer phan" command to conveniently run phan. * Removing manual extensions for eslint. Change-Id: I7eee67a7be3d74429f897dd165c268a8fd930b3a
38 lines
675 B
JavaScript
38 lines
675 B
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package CategoryTree
|
|
*/
|
|
|
|
/* eslint-env node */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
banana: conf.MessagesDirs,
|
|
eslint: {
|
|
options: {
|
|
cache: true
|
|
},
|
|
all: [
|
|
'**/*.js{,on}',
|
|
'!{vendor,node_modules}/**'
|
|
]
|
|
},
|
|
stylelint: {
|
|
all: [
|
|
'**/*.css',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|