[Pkg-javascript-commits] [node-stack-utils] 08/67: add coveralls, documentation intro

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:53:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-stack-utils.

commit 686b91d94d941e6bb5ec4d0f289a5de8c0fdc6f2
Author: James Talmage <james at talmage.io>
Date:   Mon Jan 4 00:02:37 2016 -0500

    add coveralls, documentation intro
---
 .travis.yml  |  3 +++
 package.json |  3 ++-
 readme.md    | 12 +++++++-----
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index ab2fee2..c25e769 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,3 +4,6 @@ node_js:
   - '4'
   - '0.12'
   - '0.10'
+
+after_script:
+  - 'cat ./coverage/lcov.info | ./node_modules/.bin/coveralls'
diff --git a/package.json b/package.json
index 891b392..6fccd60 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "stack-utils",
   "version": "0.0.0",
-  "description": "My mathematical module",
+  "description": "Captures and cleans stack traces",
   "license": "MIT",
   "repository": "jamestalmage/stack-utils",
   "author": {
@@ -31,6 +31,7 @@
   "dependencies": {},
   "devDependencies": {
     "ava": "^0.8.0",
+    "coveralls": "^2.11.6",
     "flatten": "0.0.1",
     "nyc": "^5.2.0",
     "xo": "^0.12.1"
diff --git a/readme.md b/readme.md
index 52ad99a..d98b273 100644
--- a/readme.md
+++ b/readme.md
@@ -1,7 +1,8 @@
-# stack-utils [![Build Status](https://travis-ci.org/jamestalmage/stack-utils.svg?branch=master)](https://travis-ci.org/jamestalmage/stack-utils)
+# stack-utils [![Build Status](https://travis-ci.org/jamestalmage/stack-utils.svg?branch=master)](https://travis-ci.org/jamestalmage/stack-utils) [![Coverage Status](https://coveralls.io/repos/jamestalmage/stack-utils/badge.svg?branch=master&service=github)](https://coveralls.io/github/jamestalmage/stack-utils?branch=master)
 
-> My mathematical module
+> Captures and cleans stack traces.
 
+Extracted from `lib/stack.js` in the [`node-tap` project](https://github.com/tapjs/node-tap)
 
 ## Install
 
@@ -13,10 +14,11 @@ $ npm install --save stack-utils
 ## Usage
 
 ```js
-const stackUtils = require('stack-utils');
+const StackUtils = require('stack-utils');
+const stack = new StackUtils({cwd: process.cwd(), internals: StackUtils.nodeInternals()});
 
-stackUtils('unicorns');
-//=> 'unicorns & rainbows'
+console.log(stack.clean(new Error().stack));
+// outputs a beutified stack trace
 ```
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stack-utils.git



More information about the Pkg-javascript-commits mailing list