mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-12-01 02:46:15 +00:00
64a39ae460
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
54 lines
995 B
JavaScript
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' );
|
|
};
|