2024-04-19 19:04:19 +00:00
|
|
|
'use strict';
|
2017-05-11 15:28:50 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-20 05:17:55 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2024-04-19 19:04:19 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2017-01-23 14:07:54 +00:00
|
|
|
|
2015-06-20 05:17:55 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-05-11 15:28:50 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2017-04-17 21:51:17 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 05:17:55 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-05-11 15:28:50 +00:00
|
|
|
eslint: {
|
2019-05-07 17:40:17 +00:00
|
|
|
options: {
|
|
|
|
cache: true
|
|
|
|
},
|
2016-02-08 22:39:07 +00:00
|
|
|
all: [
|
2019-05-07 17:40:17 +00:00
|
|
|
'**/*.js{,on}',
|
|
|
|
'!{vendor,node_modules}/**'
|
2016-02-08 22:39:07 +00:00
|
|
|
]
|
2015-06-20 05:17:55 +00:00
|
|
|
},
|
2017-01-23 14:07:54 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2017-04-17 21:51:17 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
2024-10-04 22:07:44 +00:00
|
|
|
'**/*.{css,less}',
|
2019-05-07 17:40:17 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2015-06-20 05:17:55 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-07 17:40:17 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
2015-06-20 05:17:55 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|