Math/Gruntfile.js

51 lines
1008 B
JavaScript

/* eslint-env node, es6 */
module.exports = function ( grunt ) {
var conf = grunt.file.readJSON( 'extension.json' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.initConfig( {
banana: conf.MessagesDirs,
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
},
stylelint: {
all: [
'**/*.css',
'!node_modules/**',
'!vendor/**'
]
},
watch: {
files: [
'.{stylelintrc,.eslintrc}.json',
'<%= eslint.all %>',
'<%= stylelint.all %>'
],
tasks: 'test'
},
eslint: {
options: {
reportUnusedDisableDirectives: true,
cache: true
},
all: [
'**/*.js',
'!**/node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};