mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
5aefeb3f2e
* Update package.json based on Flow's * Add Gruntfile.js based on Flow's * Add .csslintrc and .jscsrc with rules to silence errors for now Change-Id: Ia8e23537d8dccbcff9ee336f667dc463590c0235
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' );
|
|
};
|