2022-02-07 16:35:42 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-06-20 04:54:10 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2022-02-07 16:35:42 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2017-01-23 13:48:11 +00:00
|
|
|
|
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',
|
2020-06-16 14:45:59 +00:00
|
|
|
'!{vendor,node_modules,modules/ve-math/tools/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: {
|
2020-06-16 14:45:59 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-04-03 22:29:36 +00:00
|
|
|
},
|
2017-04-28 16:33:08 +00:00
|
|
|
all: [
|
2019-09-17 13:46:05 +00:00
|
|
|
'**/*.{js,json}',
|
2020-06-16 14:45:59 +00:00
|
|
|
'!{vendor,node_modules,modules/ve-math/tools/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' );
|
|
|
|
};
|