2016-01-10 17:58:21 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package CookieWarning
|
|
|
|
*/
|
|
|
|
|
2018-03-22 20:20:28 +00:00
|
|
|
/* eslint-env node */
|
2016-01-10 17:58:21 +00:00
|
|
|
module.exports = function ( grunt ) {
|
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2018-03-22 20:20:28 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2018-11-24 21:46:35 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2016-01-10 17:58:21 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
|
|
|
banana: conf.MessagesDirs,
|
2018-03-22 20:20:28 +00:00
|
|
|
eslint: {
|
2019-08-01 23:21:12 +00:00
|
|
|
options: {
|
2020-01-10 13:51:33 +00:00
|
|
|
cache: true
|
2019-08-01 23:21:12 +00:00
|
|
|
},
|
2016-01-10 17:58:21 +00:00
|
|
|
all: [
|
2020-09-12 11:42:25 +00:00
|
|
|
'**/*.{js,json}',
|
2018-03-22 20:20:28 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2016-01-10 17:58:21 +00:00
|
|
|
]
|
|
|
|
},
|
2018-11-24 21:46:35 +00:00
|
|
|
stylelint: {
|
2016-01-10 17:58:21 +00:00
|
|
|
options: {
|
2018-11-24 21:46:35 +00:00
|
|
|
syntax: 'less'
|
2016-01-10 17:58:21 +00:00
|
|
|
},
|
2018-11-24 21:46:35 +00:00
|
|
|
src: [ 'resources/**/*.{css,less}' ]
|
2016-01-10 17:58:21 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2020-09-12 11:42:25 +00:00
|
|
|
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] );
|
2016-01-10 17:58:21 +00:00
|
|
|
grunt.registerTask( 'test', [ 'lint', 'banana' ] );
|
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|