mediawiki-extensions-Templa.../Gruntfile.js
James D. Forrester c8f4e02651 build: Replace csslint with stylelint and bump others
Change-Id: I84a1b850073ffae51c1c35a4f371cbac23b0d94e
2016-05-20 13:14:59 +01:00

57 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-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
jshint: {
options: {
jshintrc: true
},
all: [
'modules/**/*.js',
'tests/**/*.js'
]
},
jscs: {
src: '<%= jshint.all %>'
},
stylelint: {
all: [
'modules/*.css',
'resources/*.css'
]
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};