2015-05-29 14:52:06 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package SyntaxHighlight_GeSHi
|
|
|
|
*/
|
|
|
|
|
2016-11-19 13:56:05 +00:00
|
|
|
/* eslint-env node */
|
2015-05-29 14:52:06 +00:00
|
|
|
module.exports = function ( grunt ) {
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
2016-11-19 13:56:05 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-05-29 14:52:06 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
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: {
|
2015-05-29 14:52:06 +00:00
|
|
|
all: [
|
|
|
|
'*.js',
|
|
|
|
'modules/**/*.js'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'*.json',
|
|
|
|
'i18n/*.json',
|
|
|
|
'modules/**/*.json'
|
|
|
|
]
|
|
|
|
},
|
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
|
|
|
},
|
2015-05-29 14:52:06 +00:00
|
|
|
banana: {
|
2015-09-18 11:28:14 +00:00
|
|
|
options: {
|
|
|
|
disallowDuplicateTranslations: false
|
|
|
|
},
|
2015-05-29 14:52:06 +00:00
|
|
|
all: 'i18n/'
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
files: [
|
2016-05-18 13:28:55 +00:00
|
|
|
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
|
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'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2016-11-19 13:56:05 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'stylelint', 'banana' ] );
|
2015-05-29 14:52:06 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|