2019-05-07 00:20:57 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-20 04:57:40 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2019-05-07 00:20:57 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-20 04:57:40 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2024-05-17 21:19:48 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 04:57:40 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2019-05-07 00:20:57 +00:00
|
|
|
eslint: {
|
2015-10-02 07:48:42 +00:00
|
|
|
options: {
|
2019-05-07 00:20:57 +00:00
|
|
|
cache: true
|
2015-10-02 07:48:42 +00:00
|
|
|
},
|
|
|
|
all: [
|
2019-05-07 00:43:39 +00:00
|
|
|
'**/*.js{,on}',
|
2019-05-07 00:20:57 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2015-10-02 07:48:42 +00:00
|
|
|
]
|
|
|
|
},
|
2024-05-17 21:19:48 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.{css,less}',
|
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
|
|
|
]
|
|
|
|
},
|
2019-05-07 00:43:39 +00:00
|
|
|
banana: conf.MessagesDirs
|
2015-06-20 04:57:40 +00:00
|
|
|
} );
|
|
|
|
|
2024-05-17 21:19:48 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-06-20 04:57:40 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|