mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-30 18:45:07 +00:00
ea89b7d431
Change-Id: I9938114502189ed5cd472f4782d2974d5a182283
54 lines
1,008 B
JavaScript
54 lines
1,008 B
JavaScript
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.initConfig( {
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true,
|
|
ignores: [
|
|
'tests/externals/**'
|
|
]
|
|
},
|
|
all: [
|
|
'**/*.js',
|
|
'!node_modules/**',
|
|
'!docs/**'
|
|
]
|
|
},
|
|
jscs: {
|
|
src: [
|
|
'<%= jshint.all %>',
|
|
'!tests/externals/**',
|
|
'!docs/**'
|
|
]
|
|
},
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
watch: {
|
|
files: [
|
|
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
|
|
'<%= jshint.all %>',
|
|
'<%= csslint.all %>'
|
|
],
|
|
tasks: 'test'
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**',
|
|
'!docs/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'test', 'lint' );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|