2015-05-29 14:52:06 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package SyntaxHighlight_GeSHi
|
|
|
|
*/
|
|
|
|
|
2017-05-14 12:03:20 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-05-29 14:52:06 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2017-01-23 14:10:18 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-05-29 14:52:06 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
2016-11-19 13:56:05 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2016-05-18 13:28:55 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-05-29 14:52:06 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2016-11-19 13:56:05 +00:00
|
|
|
eslint: {
|
2019-02-10 16:56:10 +00:00
|
|
|
options: {
|
2019-04-03 23:26:40 +00:00
|
|
|
reportUnusedDisableDirectives: true,
|
2019-05-07 17:47:46 +00:00
|
|
|
extensions: [ '.js', '.json' ],
|
2019-04-03 23:26:40 +00:00
|
|
|
cache: true
|
2019-02-10 16:56:10 +00:00
|
|
|
},
|
2015-05-29 14:52:06 +00:00
|
|
|
all: [
|
2019-05-07 17:47:46 +00:00
|
|
|
'**/*.js{,on}',
|
|
|
|
'!{vendor,node_modules}/**'
|
2015-05-29 14:52:06 +00:00
|
|
|
]
|
|
|
|
},
|
2016-05-18 13:28:55 +00:00
|
|
|
stylelint: {
|
2016-05-20 12:58:01 +00:00
|
|
|
all: [
|
2016-05-18 13:28:55 +00:00
|
|
|
'**/*.css',
|
|
|
|
'!**/*.generated.css',
|
|
|
|
'!vendor/**',
|
|
|
|
'!node_modules/**'
|
|
|
|
]
|
2015-05-27 16:15:00 +00:00
|
|
|
},
|
2017-01-23 14:10:18 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2015-05-29 14:52:06 +00:00
|
|
|
watch: {
|
|
|
|
files: [
|
2016-11-19 13:56:05 +00:00
|
|
|
'<%= eslint.all %>',
|
2016-05-18 13:28:55 +00:00
|
|
|
'<%= stylelint.all %>'
|
2015-05-29 14:52:06 +00:00
|
|
|
],
|
|
|
|
tasks: 'test'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-07 17:47:46 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-05-29 14:52:06 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|