mediawiki-extensions-Math/Gruntfile.js
Ed Sanders 7fa037e120 Fix watch path for css
Change-Id: I854cc44e4848ef077c5e1325ede840c6cc1d5721
2016-05-20 14:01:31 +01:00

71 lines
1.3 KiB
JavaScript

/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: {
all: 'i18n/'
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**'
]
},
stylelint: {
core: {
src: [
'**/*.css',
'!modules/ve-math/**',
'!node_modules/**'
]
},
've-math': {
options: {
configFile: 'modules/ve-math/.stylelintrc'
},
src: [
'modules/ve-math/**/*.css'
]
}
},
jshint: {
options: {
jshintrc: true
},
all: [
'*.js',
'modules/**/*.js'
]
},
watch: {
files: [
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
'<%= jshint.all %>',
'<%= stylelint.core.src %>',
'<%= stylelint[ "ve-math" ].src %>'
],
tasks: 'test'
},
jscs: {
fix: {
options: {
fix: true
},
src: '<%= jshint.all %>'
},
main: {
src: '<%= jshint.all %>'
}
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};