2014-06-04 02:34:04 +00:00
|
|
|
/*!
|
|
|
|
* Grunt file
|
|
|
|
*
|
|
|
|
* @package TemplateData
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*jshint node:true */
|
|
|
|
module.exports = function ( grunt ) {
|
2015-09-17 20:10:33 +00:00
|
|
|
var conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
|
2016-05-24 14:25:25 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
2014-06-04 02:34:04 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
2015-06-06 01:21:18 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jscs' );
|
2016-05-24 14:25:25 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
2016-05-19 19:17:39 +00:00
|
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
2014-06-04 02:34:04 +00:00
|
|
|
|
|
|
|
grunt.initConfig( {
|
|
|
|
jshint: {
|
|
|
|
options: {
|
|
|
|
jshintrc: true
|
|
|
|
},
|
|
|
|
all: [
|
2016-02-19 13:19:00 +00:00
|
|
|
'modules/**/*.js',
|
|
|
|
'tests/**/*.js'
|
2014-06-04 02:34:04 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
jscs: {
|
|
|
|
src: '<%= jshint.all %>'
|
|
|
|
},
|
2016-05-19 19:17:39 +00:00
|
|
|
stylelint: {
|
2014-06-04 02:34:04 +00:00
|
|
|
all: [
|
|
|
|
'modules/*.css',
|
|
|
|
'resources/*.css'
|
|
|
|
]
|
|
|
|
},
|
2016-05-19 19:17:39 +00:00
|
|
|
jsonlint: {
|
|
|
|
all: [
|
|
|
|
'**/*.json',
|
|
|
|
'!node_modules/**'
|
|
|
|
]
|
|
|
|
},
|
2015-05-29 19:38:41 +00:00
|
|
|
banana: conf.MessagesDirs,
|
2014-06-04 02:34:04 +00:00
|
|
|
watch: {
|
|
|
|
files: [
|
2016-05-19 19:17:39 +00:00
|
|
|
'.{stylelintrc,jscsrc,jshintignore,jshintrc}',
|
2014-06-04 02:34:04 +00:00
|
|
|
'<%= jshint.all %>',
|
2016-05-19 19:17:39 +00:00
|
|
|
'<%= stylelint.all %>'
|
2014-06-04 02:34:04 +00:00
|
|
|
],
|
|
|
|
tasks: 'test'
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
|
2016-05-19 19:17:39 +00:00
|
|
|
grunt.registerTask( 'test', [ 'jshint', 'jscs', 'stylelint', 'jsonlint', 'banana' ] );
|
2014-06-04 02:34:04 +00:00
|
|
|
grunt.registerTask( 'default', 'test' );
|
|
|
|
};
|