mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-24 16:03:45 +00:00
8e3471ddc8
Change-Id: I65a85756fcec790fe722c8bc523ba39c7d446b85
53 lines
1 KiB
JavaScript
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' );
|
|
};
|