From 47d5daf74d39ca0cd451ac471acc178e6e24dedb Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 19 Jun 2015 22:09:03 -0700 Subject: [PATCH] build: Configure banana-checker and jsonlint Change-Id: Id3f1d601f6b99e9646c7a1c6b430b1dd777e952b --- .gitignore | 1 + Gruntfile.js | 20 ++++++++++++++++++++ package.json | 12 ++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .gitignore create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c2658d7d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000000000..9c56558ad --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,20 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + grunt.initConfig( { + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000000000..76e8a825c --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "private": true, + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-banana-checker": "0.2.2", + "grunt-jsonlint": "1.0.4" + } +}