2022-02-07 17:26:29 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-06-22 23:29:10 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2022-02-07 17:26:29 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2019-05-07 18:30:32 +00:00
|
|
|
|
2015-11-15 14:30:18 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2016-11-20 17:13:39 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-22 23:29:10 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2016-11-20 17:13:39 +00:00
|
|
|
eslint: {
|
2019-02-06 01:26:47 +00:00
|
|
|
options: {
|
2021-05-23 14:47:27 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-02-06 01:26:47 +00:00
|
|
|
},
|
2015-11-15 14:30:18 +00:00
|
|
|
all: [
|
2019-10-07 15:52:10 +00:00
|
|
|
'**/*.{js,json}',
|
2022-05-03 05:46:28 +00:00
|
|
|
'!{vendor,node_modules,docs}/**'
|
2015-11-15 14:30:18 +00:00
|
|
|
]
|
|
|
|
},
|
2016-11-20 17:13:39 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
2022-03-13 22:46:07 +00:00
|
|
|
'**/*.{css,less}',
|
2022-05-03 05:46:28 +00:00
|
|
|
'!{vendor,node_modules,docs}/**'
|
2016-11-20 17:13:39 +00:00
|
|
|
]
|
2015-11-15 14:30:18 +00:00
|
|
|
},
|
2019-05-07 18:30:32 +00:00
|
|
|
banana: conf.MessagesDirs
|
2015-06-22 23:29:10 +00:00
|
|
|
} );
|
|
|
|
|
2019-05-07 18:30:32 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-06-22 23:29:10 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|