mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-12 01:08:55 +00:00
7fa037e120
Change-Id: I854cc44e4848ef077c5e1325ede840c6cc1d5721
71 lines
1.3 KiB
JavaScript
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' );
|
|
};
|