2016-12-14 13:09:10 +00:00
|
|
|
/* eslint-env node */
|
|
|
|
|
2015-06-20 04:55:50 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2017-01-23 13:51:12 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-06-20 04:55:50 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2016-12-14 13:09:10 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-20 04:55:50 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2016-07-18 14:24:02 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-20 04:55:50 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-01-23 13:51:12 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2015-06-20 04:55:50 +00:00
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
|
|
|
'!node_modules/**'
|
|
|
|
]
|
2016-07-18 13:49:27 +00:00
|
|
|
},
|
2016-12-14 13:09:10 +00:00
|
|
|
eslint: {
|
2016-07-18 13:49:27 +00:00
|
|
|
all: [
|
|
|
|
'*.js',
|
|
|
|
'resources/mmv/**/*.js',
|
|
|
|
'tests/**/*.js'
|
|
|
|
]
|
|
|
|
},
|
2016-07-18 14:24:02 +00:00
|
|
|
stylelint: {
|
|
|
|
options: {
|
|
|
|
syntax: 'less'
|
|
|
|
},
|
|
|
|
src: 'resources/mmv/**/*.{css,less}'
|
2015-06-20 04:55:50 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2016-12-14 13:09:10 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
2015-06-20 04:55:50 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|