2015-04-21 03:22:20 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package Cite
|
|
|
|
*/
|
|
|
|
|
2021-11-03 12:33:54 +00:00
|
|
|
'use strict';
|
2016-11-02 12:50:48 +00:00
|
|
|
|
2015-04-21 03:22:20 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2021-11-03 12:33:54 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2017-01-23 13:34:53 +00:00
|
|
|
|
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' );
|
2016-05-17 17:15:13 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2018-02-12 17:13:51 +00:00
|
|
|
|
2015-04-21 03:22:20 +00:00
|
|
|
grunt.initConfig( {
|
2016-11-02 12:50:48 +00:00
|
|
|
eslint: {
|
2019-04-03 22:52:46 +00:00
|
|
|
options: {
|
2020-06-09 10:27:52 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-04-03 22:52:46 +00:00
|
|
|
},
|
2017-04-28 16:30:52 +00:00
|
|
|
all: [
|
2019-10-07 15:24:49 +00:00
|
|
|
'**/*.{js,json}',
|
2023-12-19 13:36:26 +00:00
|
|
|
'!{vendor,node_modules}/**',
|
|
|
|
'!cypress/screenshots/**/*.js'
|
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-08-03 13:19:10 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2017-04-28 16:31:20 +00:00
|
|
|
]
|
2015-04-21 03:22:20 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2021-05-17 23:43:06 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-04-21 03:22:20 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|