mediawiki-extensions-Echo/Gruntfile.js
Ed Sanders a42b461760 build: Re-use MessageDirs in banana conf
Change-Id: Ib3819bac7b8b616ccebf8086fc3cab0d7f56a228
2017-01-23 14:26:17 +00:00

53 lines
1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* eslint-env node */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
src: [
'**/*.js',
'!node_modules/**',
'!vendor/**',
'!tests/externals/**',
'!docs/**'
]
},
// Lint Styling
stylelint: {
options: {
syntax: 'less'
},
all: [
'modules/**/*.css',
'modules/**/*.less'
]
},
banana: conf.MessagesDirs,
watch: {
files: [
'.{stylelintrc,eslintrc.json}',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!docs/**'
]
}
} );
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', 'lint' );
grunt.registerTask( 'default', 'test' );
};