2022-02-07 16:25:32 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-11-24 16:03:00 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2023-09-12 17:19:53 +00:00
|
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-11-24 16:03:00 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2017-03-21 10:13:18 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2015-11-24 16:03:00 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
2017-03-21 10:13:18 +00:00
|
|
|
eslint: {
|
2019-02-10 15:39:13 +00:00
|
|
|
options: {
|
2020-06-12 21:51:38 +00:00
|
|
|
cache: true,
|
|
|
|
fix: grunt.option( 'fix' )
|
2019-02-10 15:39:13 +00:00
|
|
|
},
|
2023-09-13 13:02:43 +00:00
|
|
|
all: [ '.' ]
|
2015-11-24 16:03:00 +00:00
|
|
|
},
|
2017-03-21 10:13:18 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
2017-03-21 14:42:04 +00:00
|
|
|
'**/*.{css,less}',
|
2017-03-21 10:13:18 +00:00
|
|
|
'!resources/lib/**',
|
2017-08-19 07:40:58 +00:00
|
|
|
'!node_modules/**',
|
2020-12-11 11:30:44 +00:00
|
|
|
'!vendor/**',
|
|
|
|
'resources/lib/codemirror-fixes.less'
|
2017-03-21 10:13:18 +00:00
|
|
|
]
|
2015-11-24 16:03:00 +00:00
|
|
|
},
|
2023-09-12 17:19:53 +00:00
|
|
|
banana: conf.MessagesDirs
|
2015-11-24 16:03:00 +00:00
|
|
|
} );
|
|
|
|
|
2019-05-06 22:29:44 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
2015-11-24 16:03:00 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|