mediawiki-extensions-Templa.../Gruntfile.js
Kunal Mehta 8e3471ddc8 test: Read i18n directories for banana-checker from extension.json
Change-Id: I65a85756fcec790fe722c8bc523ba39c7d446b85
2015-05-29 12:44:52 -07:00

53 lines
1 KiB
JavaScript

/*!
* Grunt file
*
* @package TemplateData
*/
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs-checker' );
var conf = grunt.file.readJSON( 'extension.json' );
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
jshint: {
options: {
jshintrc: true
},
all: [
'modules/*.js',
'tests/*.js'
]
},
jscs: {
src: '<%= jshint.all %>'
},
csslint: {
options: {
csslintrc: '.csslintrc'
},
all: [
'modules/*.css',
'resources/*.css'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= csslint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'csslint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};