mediawiki-extensions-Templa.../Gruntfile.js
Ed Sanders 479f887af9 Update stylelint-config version
Change-Id: Ib2bfe549ff3c054c4363abbbc3ac78f4b6c6b51c
2016-05-24 15:25:25 +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-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
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' );
};