2018-04-11 02:25:55 +00:00
|
|
|
/* eslint-env node */
|
2016-05-30 22:21:25 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2018-04-11 02:25:55 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2016-05-30 22:21:25 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2018-04-11 02:25:55 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2016-05-30 22:21:25 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2018-04-11 02:25:55 +00:00
|
|
|
eslint: {
|
2019-08-03 04:41:56 +00:00
|
|
|
options: {
|
2020-01-08 04:58:42 +00:00
|
|
|
cache: true
|
2019-08-03 04:41:56 +00:00
|
|
|
},
|
2018-04-26 15:46:15 +00:00
|
|
|
all: '.'
|
2016-05-30 22:21:25 +00:00
|
|
|
},
|
2018-04-11 02:25:55 +00:00
|
|
|
stylelint: {
|
|
|
|
options: {
|
|
|
|
syntax: 'less'
|
|
|
|
},
|
|
|
|
all: [
|
|
|
|
'**/*.{css,less}',
|
|
|
|
'!vendor/**'
|
|
|
|
]
|
2016-05-30 22:21:25 +00:00
|
|
|
},
|
2020-09-12 11:55:47 +00:00
|
|
|
banana: conf.MessagesDirs
|
2016-05-30 22:21:25 +00:00
|
|
|
} );
|
|
|
|
|
2020-09-12 11:55:47 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2016-05-30 22:21:25 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|