From dd5ac2a3852cc5deb8f18b415e58c6ab458f4762 Mon Sep 17 00:00:00 2001 From: quim Date: Wed, 21 Jan 2015 22:52:01 +0000 Subject: [PATCH] v.1.4.2 --- .gitignore | 2 ++ README.md | 46 ++++++++++++++++++++++++++++++---------------- package.json | 30 ++++++++++++++++++------------ 3 files changed, 50 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index ccc2930..f50e5b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /coverage /node_modules +*.html +*.log \ No newline at end of file diff --git a/README.md b/README.md index ca6bc10..2d0dae9 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,6 @@ JWT encode and decode for Node.js that can use callbacks or by returning an object `{error:, value:}` -**code coverage:** -`npm test && npm run check-coverage && npm run coverage` - -**codestyle:** -`npm run codestyle` - -**jshint:** -`npm run jshint` - **WIKI** JSON Web Token (JWT) is a compact URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JavaScript Object Notation (JSON) object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or MACed and/or encrypted. @@ -21,13 +12,7 @@ JSON Web Token (JWT) is a compact URL-safe means of representing claims to be tr -[![Build Status](https://travis-ci.org/joaquimserafim/json-web-token.png?branch=master)](https://travis-ci.org/joaquimserafim/json-web-token) - - - -**V1.2** - - +[![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg?style=flat-square)](https://travis-ci.org/joaquimserafim/json-web-token)![Code Coverage 100%](https://img.shields.io/badge/code%20coverage-100%25-green.svg?style=flat-square)[![ISC License](https://img.shields.io/badge/license-ISC-blue.svg?style=flat-square)](https://github.com/joaquimserafim/json-web-token/blob/master/LICENSE) ###API @@ -100,3 +85,32 @@ JSON Web Token (JWT) is a compact URL-safe means of representing claims to be tr } }); + +--- + +#####this projet has been set up with a precommit that forces you to follow a code style, no jshint issues and 100% of code coverage before commit + +to run test +``` js +npm test +``` + +to run jshint +``` js +npm run jshint +``` + +to run code style +``` js +npm run code-style +``` + +to run check code coverage +``` js +npm run check-coverage +``` + +to open the code coverage report +``` js +npm run open-coverage +``` diff --git a/package.json b/package.json index e353215..5ffd6ea 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,20 @@ { "name": "json-web-token", - "version": "1.3.2", + "version": "1.4.2", "description": "JSON Web Token (JWT) is a compact token format intended for space constrained environments such as HTTP Authorization headers and URI query parameters.", "main": "index.js", "scripts": { - "test": "./node_modules/istanbul/lib/cli.js cover ./node_modules/tape/bin/tape test/test.js", - "jshint": "./node_modules/jshint/bin/jshint -c .jshintrc index.js test/*.js", - "codestyle": "./node_modules/jscs/bin/jscs -p google index.js test/*.js", - "check-coverage": "./node_modules/istanbul/lib/cli.js check-coverage --statements 100 --functions 100 --lines 100 --branches 100", - "coverage": "open coverage/lcov-report/index.html" + "test": "istanbul cover tape test/test.js", + "jshint": "jshint -c .jshintrc index.js test/*.js", + "code-style": "jscs -p google index.js test/*.js", + "check-coverage": "istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100", + "open-coverage": "open coverage/lcov-report/index.html" }, + "files": [ + "LICENSE", + "README.md", + "index.js" + ], "repository": { "type": "git", "url": "git://github.com/joaquimserafim/json-web-token.git" @@ -29,18 +34,19 @@ }, "homepage": "https://github.com/joaquimserafim/json-web-token", "dependencies": { - "base64-url": "~1.0.0" + "base64-url": "^1.2.0" }, "devDependencies": { - "istanbul": "^0.3.2", - "jscs": "^1.7.3", + "istanbul": "^0.3.5", + "jscs": "^1.10.0", "jshint": "^2.5.6", - "pre-commit": "0.0.9", - "tape": "^3.0.1" + "pre-commit": "0.0.11", + "tape": "^3.4.0", + "which": "^1.0.8" }, "pre-commit": [ "jshint", - "codestyle", + "code-style", "test", "check-coverage" ]