mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-12-01 11:16:14 +00:00
e7ff2ba8b6
Change-Id: I6f97359c6f34f2e5687ce91ab9926c493e613bf5
51 lines
920 B
JavaScript
51 lines
920 B
JavaScript
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
},
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true
|
|
},
|
|
all: [
|
|
'*.js',
|
|
'resources/mmv/**/*.js',
|
|
'tests/**/*.js'
|
|
]
|
|
},
|
|
jscs: {
|
|
fix: {
|
|
options: {
|
|
fix: true
|
|
},
|
|
src: '<%= jshint.all %>'
|
|
},
|
|
main: {
|
|
src: '<%= jshint.all %>'
|
|
}
|
|
},
|
|
stylelint: {
|
|
options: {
|
|
syntax: 'less'
|
|
},
|
|
src: 'resources/mmv/**/*.{css,less}'
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'stylelint', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|