mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
0e81494e4c
Change-Id: I4cfc08ccc3d03cfbcdfd9b83cfe31c1148f849fc
63 lines
1.1 KiB
JavaScript
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' );
|
|
};
|