2015-05-02 03:49:09 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
2017-08-03 23:05:54 +00:00
|
|
|
* @package Thanks
|
2015-05-02 03:49:09 +00:00
|
|
|
*/
|
|
|
|
|
2022-01-07 15:18:13 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-05-02 03:49:09 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2022-01-07 15:18:13 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2017-08-03 23:05:54 +00:00
|
|
|
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2015-05-02 03:49:09 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
2017-08-03 23:05:54 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-05-02 03:49:09 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-08-03 23:05:54 +00:00
|
|
|
eslint: {
|
2019-05-07 17:54:51 +00:00
|
|
|
options: {
|
2020-07-09 15:35:57 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-05-07 17:54:51 +00:00
|
|
|
},
|
2015-05-02 03:49:09 +00:00
|
|
|
all: [
|
2019-12-12 11:36:24 +00:00
|
|
|
'**/*.{js,json}',
|
2022-01-07 15:18:13 +00:00
|
|
|
'!{vendor,node_modules,docs}/**'
|
2015-05-02 03:49:09 +00:00
|
|
|
]
|
|
|
|
},
|
2018-11-18 15:55:46 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2015-05-02 03:49:09 +00:00
|
|
|
watch: {
|
|
|
|
files: [
|
2017-08-03 23:05:54 +00:00
|
|
|
'.eslintrc.json',
|
|
|
|
'<%= eslint.all %>'
|
2015-05-02 03:49:09 +00:00
|
|
|
],
|
|
|
|
tasks: 'test'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-09-05 23:40:03 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
|
2015-05-02 03:49:09 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|