2016-11-20 17:13:39 +00:00
|
|
|
/* eslint-env node */
|
2015-06-22 23:29:10 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2015-11-15 14:30:18 +00:00
|
|
|
var 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: {
|
2019-03-13 22:45:20 +00:00
|
|
|
cache: true
|
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}',
|
2019-05-07 18:30:32 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2015-11-15 14:30:18 +00:00
|
|
|
]
|
|
|
|
},
|
2016-11-20 17:13:39 +00:00
|
|
|
stylelint: {
|
|
|
|
options: {
|
|
|
|
syntax: 'less'
|
|
|
|
},
|
|
|
|
all: [
|
|
|
|
'**/*.less',
|
2019-05-07 18:30:32 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
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' );
|
|
|
|
};
|