2015-04-21 01:46:37 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package CiteThisPage
|
|
|
|
*/
|
|
|
|
|
2019-05-06 22:37:39 +00:00
|
|
|
/* eslint-env node, es6 */
|
2015-04-21 01:46:37 +00:00
|
|
|
module.exports = function ( grunt ) {
|
2019-05-06 22:37:39 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2015-04-21 01:46:37 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2019-05-06 22:37:39 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
2017-04-17 18:08:25 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
|
2015-04-21 01:46:37 +00:00
|
|
|
grunt.initConfig( {
|
2019-05-06 22:37:39 +00:00
|
|
|
eslint: {
|
|
|
|
options: {
|
2019-05-06 22:40:26 +00:00
|
|
|
extensions: [ '.js', '.json' ],
|
2019-05-06 22:37:39 +00:00
|
|
|
cache: true
|
|
|
|
},
|
|
|
|
all: [
|
2019-05-06 22:40:26 +00:00
|
|
|
'**/*.js{,on}',
|
2019-05-06 22:37:39 +00:00
|
|
|
'!{vendor,node_modules}/**'
|
|
|
|
]
|
2015-06-12 04:29:37 +00:00
|
|
|
},
|
2019-05-06 22:37:39 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2017-04-17 18:08:25 +00:00
|
|
|
stylelint: {
|
|
|
|
all: [
|
|
|
|
'**/*.css',
|
2017-08-19 07:39:39 +00:00
|
|
|
'!node_modules/**',
|
|
|
|
'!vendor/**'
|
2015-06-12 04:29:37 +00:00
|
|
|
]
|
2015-04-21 01:46:37 +00:00
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2019-05-06 22:40:26 +00:00
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
2015-04-21 01:46:37 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|