2017-03-21 10:13:18 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-11-24 16:03:00 +00:00
|
|
|
module.exports = function ( grunt ) {
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-03-21 10:13:18 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-11-24 16:03:00 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-03-21 10:13:18 +00:00
|
|
|
eslint: {
|
2019-02-10 15:39:13 +00:00
|
|
|
options: {
|
2019-05-06 22:29:44 +00:00
|
|
|
extensions: [ '.js', '.json' ],
|
2019-02-10 15:39:13 +00:00
|
|
|
cache: true
|
|
|
|
},
|
2015-11-24 16:03:00 +00:00
|
|
|
all: [
|
2019-09-17 13:47:54 +00:00
|
|
|
'**/*.{js,json}',
|
2015-11-24 16:03:00 +00:00
|
|
|
'!resources/lib/**',
|
2019-05-06 22:29:44 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
2015-11-24 16:03:00 +00:00
|
|
|
]
|
|
|
|
},
|
2017-03-21 10:13:18 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
2017-03-21 14:42:04 +00:00
|
|
|
'**/*.{css,less}',
|
2017-03-21 10:13:18 +00:00
|
|
|
'!resources/lib/**',
|
2017-08-19 07:40:58 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-03-21 10:13:18 +00:00
|
|
|
]
|
2015-11-24 16:03:00 +00:00
|
|
|
},
|
|
|
|
banana: {
|
|
|
|
all: 'i18n/'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-06 22:29:44 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-11-24 16:03:00 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|