From b1e72e77d6da5783e0ed012814c60c0cbb9da621 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Wed, 17 Jun 2015 12:11:19 -0700 Subject: [PATCH] build: Configure banana-checker and jsonlint Change-Id: I515e8d5d92e3b2ed24a5be2a45072e968b06fdeb --- .gitignore | 1 + Gruntfile.js | 19 +++++++++++++++++++ package.json | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index c798be9c..e7e31811 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.kate-swp .*.swp .idea +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..5a87e7b6 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,19 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + + var conf = grunt.file.readJSON( 'extension.json' ); + grunt.initConfig( { + banana: conf.MessagesDirs, + 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 00000000..76e8a825 --- /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" + } +}