2022-03-17 22:55:02 +00:00
|
|
|
'use strict';
|
|
|
|
|
2016-04-19 12:45:09 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2022-03-17 22:55:02 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2017-01-23 14:06:05 +00:00
|
|
|
|
2016-04-19 12:45:09 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2016-09-01 11:17:47 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2016-06-30 20:21:10 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2016-04-19 12:45:09 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2016-09-01 11:17:47 +00:00
|
|
|
eslint: {
|
2019-02-10 16:54:28 +00:00
|
|
|
options: {
|
2020-06-16 14:13:36 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-02-10 16:54:28 +00:00
|
|
|
},
|
2016-09-01 11:17:47 +00:00
|
|
|
all: [
|
2019-12-11 13:42:51 +00:00
|
|
|
'**/*.{js,json}',
|
2019-06-04 07:06:35 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2016-09-01 11:17:47 +00:00
|
|
|
]
|
|
|
|
},
|
2016-06-30 20:21:10 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
2017-06-29 13:32:05 +00:00
|
|
|
'**/*.css',
|
2017-10-27 11:03:47 +00:00
|
|
|
'**/*.less',
|
2019-06-04 07:06:35 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2016-06-30 20:21:10 +00:00
|
|
|
]
|
2016-05-18 13:34:49 +00:00
|
|
|
},
|
2021-05-18 00:45:58 +00:00
|
|
|
banana: conf.MessagesDirs
|
2016-04-19 12:45:09 +00:00
|
|
|
} );
|
|
|
|
|
2019-06-04 07:06:35 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2016-04-19 12:45:09 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|