2015-05-02 03:49:09 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
2017-08-03 23:05:54 +00:00
|
|
|
* @package Thanks
|
2015-05-02 03:49:09 +00:00
|
|
|
*/
|
|
|
|
|
2022-01-07 15:18:13 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-05-02 03:49:09 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2022-01-07 15:18:13 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
2017-08-03 23:05:54 +00:00
|
|
|
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2015-05-02 03:49:09 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
2017-08-03 23:05:54 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2024-04-01 23:31:42 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-05-02 03:49:09 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-08-03 23:05:54 +00:00
|
|
|
eslint: {
|
2019-05-07 17:54:51 +00:00
|
|
|
options: {
|
2020-07-09 15:35:57 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-05-07 17:54:51 +00:00
|
|
|
},
|
2023-11-30 11:01:52 +00:00
|
|
|
all: [ '.' ]
|
2015-05-02 03:49:09 +00:00
|
|
|
},
|
2018-11-18 15:55:46 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2024-04-01 23:31:42 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.{css,less}',
|
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
|
|
|
]
|
|
|
|
},
|
2015-05-02 03:49:09 +00:00
|
|
|
watch: {
|
|
|
|
files: [
|
2024-04-01 23:31:42 +00:00
|
|
|
'.{stylelintrc,eslintrc}.json',
|
|
|
|
'<%= eslint.all %>',
|
|
|
|
'<%= stylelint.all %>'
|
2015-05-02 03:49:09 +00:00
|
|
|
],
|
|
|
|
tasks: 'test'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2024-04-01 23:31:42 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
2015-05-02 03:49:09 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|