Add grunt-jsonlint and grunt-banana-checker

jsonlint and banana-checker will test for valid i18n files

Bug: T94547
Change-Id: I68f76b69bf6a3d466ca87c83f0ab86998ef8ef74
This commit is contained in:
Umherirrender 2017-01-09 16:37:01 +01:00
parent 637cd2da5f
commit 0682e17314
3 changed files with 53 additions and 0 deletions

21
.gitignore vendored
View file

@ -1,2 +1,23 @@
node_modules/
vendor/ vendor/
composer.lock composer.lock
# Editors
*.kate-swp
*~
\#*#
.#*
.*.swp
.project
.buildpath
.classpath
.settings
cscope.files
cscope.out
*.orig
## NetBeans
nbproject*
project.index
## Sublime
sublime-*
sftp-config.json

21
Gruntfile.js Normal file
View file

@ -0,0 +1,21 @@
/*jshint node:true */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.initConfig( {
banana: {
all: 'i18n/'
},
jsonlint: {
all: [
'**/*.json',
'!node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};

11
package.json Normal file
View file

@ -0,0 +1,11 @@
{
"private": true,
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt": "1.0.1",
"grunt-banana-checker": "0.5.0",
"grunt-jsonlint": "1.1.0"
}
}