mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 19:09:52 +00:00
8b9bc3a44f
* Add package.json based on Flow's * Add Gruntfile.js based on Flow's * Add .csslintrc and .jscsrc with rules to silence errors for now * Add .gitignore (!) to ignore node_modules/ Change-Id: I2db213da2f0ce77567f7968e73af9cdd6ed9da82
52 lines
965 B
JavaScript
52 lines
965 B
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package Flow
|
|
*/
|
|
|
|
/*jshint node:true */
|
|
module.exports = function ( grunt ) {
|
|
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.initConfig( {
|
|
jshint: {
|
|
options: {
|
|
jshintrc: true
|
|
},
|
|
all: [
|
|
'*.js',
|
|
'modules/**/*.js',
|
|
'tests/qunit/**/*.js'
|
|
]
|
|
},
|
|
jscs: {
|
|
src: '<%= jshint.all %>'
|
|
},
|
|
csslint: {
|
|
options: {
|
|
csslintrc: '.csslintrc'
|
|
},
|
|
all: 'modules/**/*.css'
|
|
},
|
|
banana: {
|
|
all: 'i18n/'
|
|
},
|
|
watch: {
|
|
files: [
|
|
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
|
|
'<%= jshint.all %>',
|
|
'<%= csslint.all %>'
|
|
],
|
|
tasks: 'test'
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'lint', [ 'jscs', 'jshint', 'csslint', 'banana' ] );
|
|
grunt.registerTask( 'test', 'lint' );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|