2015-04-21 03:22:20 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package Cite
|
|
|
|
*/
|
|
|
|
|
2017-03-20 10:47:54 +00:00
|
|
|
/* eslint-env node, es6 */
|
2016-11-02 12:50:48 +00:00
|
|
|
|
2015-04-21 03:22:20 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2017-01-23 13:34:53 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-04-21 03:22:20 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2016-11-02 12:50:48 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2016-05-17 17:15:13 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-04-21 03:22:20 +00:00
|
|
|
grunt.initConfig( {
|
2016-11-02 12:50:48 +00:00
|
|
|
eslint: {
|
2017-04-28 16:30:52 +00:00
|
|
|
all: [
|
2015-12-16 12:56:14 +00:00
|
|
|
'**/*.js',
|
2015-11-19 00:54:43 +00:00
|
|
|
'{.jsduck,build}/**/*.js',
|
2015-12-16 12:56:14 +00:00
|
|
|
'modules/**/*.js',
|
|
|
|
'!node_modules/**'
|
2015-11-19 00:54:43 +00:00
|
|
|
]
|
|
|
|
},
|
2017-01-23 13:34:53 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2016-05-17 17:15:13 +00:00
|
|
|
stylelint: {
|
2017-04-28 16:31:20 +00:00
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2017-07-18 19:33:10 +00:00
|
|
|
'**/*.less',
|
2017-04-28 16:31:20 +00:00
|
|
|
'!node_modules/**'
|
|
|
|
]
|
2016-05-17 17:15:13 +00:00
|
|
|
},
|
2015-06-12 04:30:08 +00:00
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
2017-07-18 19:33:10 +00:00
|
|
|
'.stylelintrc',
|
2015-06-12 04:30:08 +00:00
|
|
|
'!node_modules/**'
|
|
|
|
]
|
2015-04-21 03:22:20 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2017-04-28 16:30:52 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'jsonlint', 'banana' ] );
|
2015-04-21 03:22:20 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|