2016-11-29 16:22:16 +00:00
|
|
|
/* eslint-env node */
|
2015-06-25 19:11:24 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2015-07-26 19:17:11 +00:00
|
|
|
var conf = grunt.file.readJSON( 'skin.json' );
|
2017-01-23 15:01:31 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2016-11-29 16:22:16 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2015-06-25 19:11:24 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2016-11-29 16:39:15 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-06-25 19:11:24 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2016-11-29 16:22:16 +00:00
|
|
|
eslint: {
|
2015-06-25 19:11:24 +00:00
|
|
|
all: [
|
2015-07-26 19:17:11 +00:00
|
|
|
'*.js',
|
|
|
|
'**/*.js',
|
2017-08-03 13:03:07 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-25 19:11:24 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
jsonlint: {
|
|
|
|
all: [
|
2016-11-29 16:22:16 +00:00
|
|
|
'*.json',
|
2015-06-25 19:11:24 +00:00
|
|
|
'**/*.json',
|
2017-08-03 13:03:07 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-25 19:11:24 +00:00
|
|
|
]
|
2016-11-29 16:22:16 +00:00
|
|
|
},
|
2016-11-29 16:39:15 +00:00
|
|
|
banana: conf.MessagesDirs,
|
|
|
|
stylelint: {
|
2017-01-23 14:59:47 +00:00
|
|
|
options: {
|
|
|
|
syntax: 'less'
|
|
|
|
},
|
2016-11-29 16:39:15 +00:00
|
|
|
all: [
|
2017-04-10 12:23:48 +00:00
|
|
|
'*.{less,css}',
|
|
|
|
'**/*.{less,css}',
|
2017-01-23 14:59:47 +00:00
|
|
|
'!node_modules/**',
|
2017-08-03 13:03:07 +00:00
|
|
|
'!skinStyles/jquery.ui/**',
|
|
|
|
'!vendor/**'
|
2016-11-29 16:39:15 +00:00
|
|
|
]
|
|
|
|
}
|
2015-06-25 19:11:24 +00:00
|
|
|
} );
|
|
|
|
|
2016-11-29 16:39:15 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
|
2015-06-25 19:11:24 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|