Skip to content

Commit

Permalink
v.1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquimserafim committed Jan 21, 2015
1 parent 9697bf1 commit dd5ac2a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/coverage
/node_modules
*.html
*.log
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -21,13 +12,7 @@ JSON Web Token (JWT) is a compact URL-safe means of representing claims to be tr

<a href="https://nodei.co/npm/json-web-token/"><img src="https://nodei.co/npm/json-web-token.png?downloads=true"></a>

[![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
Expand Down Expand Up @@ -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
```
30 changes: 18 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
]
Expand Down

0 comments on commit dd5ac2a

Please sign in to comment.