mediawiki-skins-MinervaNeue/Gruntfile.js
jdlrobson 2a70a13b69 Add scaffolding for skin
Change-Id: Ie9420dc85f658fa21a1524dca9374cb1e14fcad7
2017-06-01 10:17:24 -07:00

62 lines
1.2 KiB
JavaScript

/* eslint-env node */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'skin.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-notify' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
eslint: {
all: [
'**/*.js',
'!libs/**',
'!vendor/**',
'!docs/**',
'!node_modules/**'
]
},
stylelint: {
options: {
syntax: 'less'
},
all: [
'minerva.less/**/*.less',
'resources/**/*.less'
]
},
watch: {
lint: {
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ],
tasks: [ 'lint' ]
},
scripts: {
files: [ 'resources/**/*.js', 'tests/qunit/**/*.js' ],
tasks: [ 'test' ]
},
configFiles: {
files: [ 'Gruntfile.js' ],
options: {
reload: true
}
}
},
banana: conf.MessagesDirs,
jsonlint: {
all: [
'*.json',
'**/*.json',
'!node_modules/**'
]
}
} );
grunt.registerTask( 'lint', [ 'eslint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'lint' ] );
grunt.registerTask( 'default', [ 'test' ] );
};