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
|
|
|
*/
|
|
|
|
|
2017-08-03 23:05:54 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-05-02 03:49:09 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2018-11-18 15:55:46 +00:00
|
|
|
var 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: {
|
|
|
|
extensions: [ '.js', '.json' ],
|
|
|
|
cache: true
|
|
|
|
},
|
2015-05-02 03:49:09 +00:00
|
|
|
all: [
|
2019-12-12 11:36:24 +00:00
|
|
|
'**/*.{js,json}',
|
2019-05-07 17:54:51 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
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' );
|
|
|
|
};
|