2019-04-06 11:31:04 +00:00
|
|
|
/* eslint-env node */
|
2015-06-20 04:58:30 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2019-04-06 11:31:04 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2019-04-06 11:31:04 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2017-04-17 21:17:16 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.initConfig( {
|
2019-04-06 11:31:04 +00:00
|
|
|
eslint: {
|
2016-01-19 22:21:07 +00:00
|
|
|
all: [
|
2019-04-06 11:31:04 +00:00
|
|
|
'*.js',
|
2019-04-07 00:05:17 +00:00
|
|
|
'modules/*.js',
|
|
|
|
// Library file
|
|
|
|
'!modules/qrcode.js'
|
2016-01-19 22:21:07 +00:00
|
|
|
]
|
|
|
|
},
|
2019-04-06 11:31:04 +00:00
|
|
|
stylelint: {
|
2015-06-20 04:58:30 +00:00
|
|
|
all: [
|
2019-04-06 11:31:04 +00:00
|
|
|
'**/*.css',
|
2017-08-19 08:12:13 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-04-17 21:17:16 +00:00
|
|
|
]
|
|
|
|
},
|
2019-04-06 11:31:04 +00:00
|
|
|
banana: conf.MessagesDirs,
|
|
|
|
jsonlint: {
|
2017-04-17 21:17:16 +00:00
|
|
|
all: [
|
2019-04-06 11:31:04 +00:00
|
|
|
'**/*.json',
|
2017-08-19 08:12:13 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-20 04:58:30 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
} );
|
2019-04-06 11:31:04 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
2015-06-20 04:58:30 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|