mediawiki-extensions-Syntax.../Gruntfile.js
Ed Sanders 0e81494e4c Fix watch path for css
Change-Id: I4cfc08ccc3d03cfbcdfd9b83cfe31c1148f849fc
2016-05-20 13:58:01 +01:00

63 lines
1.1 KiB
JavaScript

/*!
* Grunt file
*
* @package SyntaxHighlight_GeSHi
*/
/*jshint node:true */
module.exports = function ( grunt ) {
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: [
'*.js',
'modules/**/*.js'
]
},
jsonlint: {
all: [
'*.json',
'i18n/*.json',
'modules/**/*.json'
]
},
jscs: {
all: '<%= jshint.all %>'
},
stylelint: {
all: [
'**/*.css',
'!**/*.generated.css',
'!vendor/**',
'!node_modules/**'
]
},
banana: {
options: {
disallowDuplicateTranslations: false
},
all: 'i18n/'
},
watch: {
files: [
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'jscs', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};