2019-04-06 11:31:04 +00:00
|
|
|
/* eslint-env node */
|
2015-06-20 04:58:30 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2019-04-06 11:31:04 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
2019-05-07 16:59:18 +00:00
|
|
|
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2019-04-06 11:31:04 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2017-04-17 21:17:16 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2019-05-07 16:59:18 +00:00
|
|
|
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.initConfig( {
|
2019-04-06 11:31:04 +00:00
|
|
|
eslint: {
|
2019-05-07 16:59:18 +00:00
|
|
|
options: {
|
|
|
|
reportUnusedDisableDirectives: true,
|
|
|
|
extensions: [ '.js', '.json' ],
|
|
|
|
cache: true
|
|
|
|
},
|
2019-07-16 02:08:27 +00:00
|
|
|
all: '.'
|
2016-01-19 22:21:07 +00:00
|
|
|
},
|
2019-04-06 11:31:04 +00:00
|
|
|
stylelint: {
|
2015-06-20 04:58:30 +00:00
|
|
|
all: [
|
2019-04-06 11:31:04 +00:00
|
|
|
'**/*.css',
|
2017-08-19 08:12:13 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-04-17 21:17:16 +00:00
|
|
|
]
|
|
|
|
},
|
2019-05-07 16:59:18 +00:00
|
|
|
banana: conf.MessagesDirs
|
2015-06-20 04:58:30 +00:00
|
|
|
} );
|
2019-05-07 16:59:18 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|