From dff9f8cca2051522de6f2b0a868ea3efa1ba31cb Mon Sep 17 00:00:00 2001 From: keelii Date: Sun, 21 Feb 2016 10:33:00 +0800 Subject: [PATCH] add cover. --- .gitignore | 1 + .travis.yml | 5 ++--- package.json | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 546bbc5..af46ee2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ config.gypi CVS npm-debug.log .idea +coverage .vscode node_modules typings diff --git a/.travis.yml b/.travis.yml index 208b503..3fd1170 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - "4.3.1" -script: - - istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec - - ./node_modules/.bin/codecov \ No newline at end of file +after_success: + - npm run cover \ No newline at end of file diff --git a/package.json b/package.json index d3fe81a..cf9f951 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ }, "scripts": { "prepublish": "", + "cover": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && ./node_modules/.bin/codecov", "test": "./node_modules/.bin/mocha test/main.js --reporter spec" }, "repository": { @@ -41,6 +42,7 @@ }, "devDependencies": { "codecov": "^1.0.1", + "istanbul": "^0.4.2", "mocha": "^2.4.5" } }