2018-11-12 16:21:34 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-20 04:54:10 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2017-01-23 13:48:11 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-06-20 04:54:10 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2016-10-28 18:11:26 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-09-14 18:46:13 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
2016-05-19 17:06:34 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 04:54:10 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-01-23 13:48:11 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2016-05-19 17:06:34 +00:00
|
|
|
stylelint: {
|
2017-04-28 16:33:25 +00:00
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2019-11-01 21:56:31 +00:00
|
|
|
'!**/{vendor,node_modules}/**'
|
2017-04-28 16:33:25 +00:00
|
|
|
]
|
2015-09-14 18:46:13 +00:00
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
files: [
|
2017-08-19 07:58:39 +00:00
|
|
|
'.{stylelintrc,.eslintrc}.json',
|
2017-04-28 16:33:08 +00:00
|
|
|
'<%= eslint.all %>',
|
2017-04-28 16:33:25 +00:00
|
|
|
'<%= stylelint.all %>'
|
2015-09-14 18:46:13 +00:00
|
|
|
],
|
|
|
|
tasks: 'test'
|
|
|
|
},
|
2016-10-28 18:11:26 +00:00
|
|
|
eslint: {
|
2019-04-03 22:29:36 +00:00
|
|
|
options: {
|
2019-05-06 23:35:47 +00:00
|
|
|
extensions: [ '.js', '.json' ],
|
2019-04-03 22:29:36 +00:00
|
|
|
cache: true
|
|
|
|
},
|
2017-04-28 16:33:08 +00:00
|
|
|
all: [
|
2019-09-17 13:46:05 +00:00
|
|
|
'**/*.{js,json}',
|
2019-11-01 21:56:31 +00:00
|
|
|
'!**/{vendor,node_modules}/**'
|
2016-10-28 18:11:26 +00:00
|
|
|
]
|
2015-06-20 04:54:10 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-06 23:35:47 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-06-20 04:54:10 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|