2017-10-09 14:34:49 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-06-20 05:13:04 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2017-01-23 14:05:26 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2017-04-07 20:21:12 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-20 05:13:04 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2015-10-07 13:29:14 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-04-18 14:25:19 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 05:13:04 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-04-07 20:21:12 +00:00
|
|
|
eslint: {
|
2019-04-03 23:20:58 +00:00
|
|
|
options: {
|
|
|
|
cache: true
|
|
|
|
},
|
2017-05-05 11:07:00 +00:00
|
|
|
all: [
|
|
|
|
'**/*.js',
|
2017-06-06 23:38:57 +00:00
|
|
|
'!node_modules/**',
|
2017-07-25 13:13:26 +00:00
|
|
|
'!resources/ext.relatedArticles.lib/**',
|
|
|
|
'!vendor/**'
|
2017-05-05 11:07:00 +00:00
|
|
|
]
|
2015-10-07 13:29:14 +00:00
|
|
|
},
|
2017-01-23 14:05:26 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2015-06-20 05:13:04 +00:00
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
2017-08-19 08:26:03 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-04-18 14:25:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.less',
|
2017-08-19 08:26:03 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-20 05:13:04 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2017-04-18 14:25:19 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
|
2015-06-20 05:13:04 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|