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-jsonlint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-11-24 16:03:00 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-03-21 10:13:18 +00:00
|
|
|
eslint: {
|
2015-11-24 16:03:00 +00:00
|
|
|
all: [
|
|
|
|
'**/*.js',
|
|
|
|
'!resources/lib/**',
|
2017-08-19 07:40:58 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
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/'
|
|
|
|
},
|
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
2017-08-19 07:40:58 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-11-24 16:03:00 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2017-03-21 10:13:18 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
2015-11-24 16:03:00 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|