mediawiki-extensions-Cite/Gruntfile.js
James D. Forrester 549e95ee5f build: Test JS code with jshint and jscs via npm
Change-Id: I4d20af87b900d10c20f1a2c3fff09dc3425d2e55
2015-11-18 16:54:55 -08:00

50 lines
832 B
JavaScript

/*!
* Grunt file
*
* @package Cite
*/
/*jshint node:true */
module.exports = function ( grunt ) {
'use strict';
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.initConfig( {
jshint: {
options: {
jshintrc: true
},
all: [
'*.js',
'{.jsduck,build}/**/*.js',
'modules/**/*.js'
]
},
banana: {
core: [ 'i18n/' ]
},
jscs: {
fix: {
options: {
fix: true
},
src: '<%= jshint.all %>'
},
main: {
src: '<%= jshint.all %>'
}
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};