mediawiki-extensions-Templa.../Gruntfile.js
James D. Forrester 64a39ae460 Add a grunt checker for jshint, jscs, csslint, and banana and pass them
There was a pre-existing jshint config (.jshintrc) file that this upgrades based
on the equivalent files for VisualEditor and OOjs UI.

Change-Id: I3ecb0e65cc7ff090b7457be895917fbd8b8afd18
2014-06-03 20:16:18 -07:00

54 lines
995 B
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' );
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: {
all: 'i18n/'
},
watch: {
files: [
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= csslint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'csslint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};