2015-05-29 14:52:06 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package SyntaxHighlight_GeSHi
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*jshint node:true */
|
|
|
|
module.exports = function ( grunt ) {
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2015-05-27 16:15:00 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
|
2015-05-29 14:52:06 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
|
|
|
|
|
|
|
grunt.initConfig( {
|
|
|
|
jshint: {
|
|
|
|
options: {
|
|
|
|
jshintrc: true
|
|
|
|
},
|
|
|
|
all: [
|
|
|
|
'*.js',
|
|
|
|
'modules/**/*.js'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'*.json',
|
|
|
|
'i18n/*.json',
|
|
|
|
'modules/**/*.json'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
jscs: {
|
|
|
|
src: '<%= jshint.all %>'
|
|
|
|
},
|
2015-05-27 16:15:00 +00:00
|
|
|
csslint: {
|
|
|
|
options: {
|
|
|
|
csslintrc: '.csslintrc'
|
|
|
|
},
|
|
|
|
all: 'modules/**/*.css'
|
|
|
|
},
|
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: [
|
2015-05-27 16:15:00 +00:00
|
|
|
'.{csslintrc,jscsrc,jshintignore,jshintrc}',
|
2015-05-29 14:52:06 +00:00
|
|
|
'<%= jshint.all %>',
|
|
|
|
'<%= csslint.all %>'
|
|
|
|
],
|
|
|
|
tasks: 'test'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2015-05-27 16:15:00 +00:00
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'jscs', 'csslint', 'banana' ] );
|
2015-05-29 14:52:06 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|