mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-28 01:30:00 +00:00
ce3ce51558
Change-Id: Ib415d306124df53be085e358e7b868aa1ced9fd1
60 lines
1.1 KiB
JavaScript
60 lines
1.1 KiB
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package TemplateData
|
|
*/
|
|
|
|
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.initConfig( {
|
|
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'
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'csslint', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|