2015-04-21 03:19:20 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package CategoryTree
|
|
|
|
*/
|
|
|
|
|
2017-04-30 08:15:57 +00:00
|
|
|
/* eslint-env node */
|
2015-04-21 03:19:20 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2019-05-11 08:04:33 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2017-04-30 08:15:57 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-04-21 03:19:20 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-04-17 17:19:52 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
|
2015-04-21 03:19:20 +00:00
|
|
|
grunt.initConfig( {
|
2019-05-11 08:04:33 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2017-04-30 08:15:57 +00:00
|
|
|
eslint: {
|
2019-05-06 22:12:10 +00:00
|
|
|
options: {
|
|
|
|
reportUnusedDisableDirectives: true,
|
|
|
|
extensions: [ '.js', '.json' ],
|
|
|
|
cache: true
|
|
|
|
},
|
2017-04-21 15:59:56 +00:00
|
|
|
all: [
|
2019-05-06 22:12:10 +00:00
|
|
|
'**/*.js{,on}',
|
|
|
|
'!{vendor,node_modules}/**'
|
2017-04-17 17:19:52 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2017-08-19 07:37:30 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-12 04:30:57 +00:00
|
|
|
]
|
2015-04-21 03:19:20 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-06 22:12:10 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-04-21 03:19:20 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|