mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RelatedArticles
synced 2024-12-18 02:50:43 +00:00
cd055fde89
Copypasta the following files from the BoilerPlate extension [0]: * package.json * Gruntfile.js * .jscsrc * .jshintrc * .jshintignore * composer.json * phpcs.xml Add the following supporting files: * .gitignore * composer.lock Finally, fix the existing coding standard violations. [0] https://github.com/wikimedia/mediawiki-extensions-BoilerPlate Change-Id: I30c6cf9e0a637bab5d8f47790b9af57183b6e6fb
36 lines
651 B
JavaScript
36 lines
651 B
JavaScript
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.initConfig( {
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true
|
|
},
|
|
all: [
|
|
'*.js',
|
|
'resources/**/*.js'
|
|
]
|
|
},
|
|
jscs: {
|
|
src: '<%= jshint.all %>'
|
|
},
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
jsonlint: {
|
|
all: [
|
|
'*.json',
|
|
'**/*.json',
|
|
'!node_modules/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|