Permalink
Browse files

documented methods

  • Loading branch information...
substack committed Jul 18, 2011
1 parent a91eb22 commit 24eb49b2b429c7ce79f24842664d2685758a99c5
Showing with 43 additions and 0 deletions.
  1. +43 −0 README.markdown
View
@@ -0,0 +1,43 @@
+bunker
+======
+
+Bunker is a module to calculate code coverage using native javascript
+[burrito](https://github.com/substack/node-burrito) AST trickery.
+
+![code coverage](http://substack.net/images/code_coverage.png)
+
+examples
+========
+
+
+
+methods
+=======
+
+var bunker = require('bunker');
+
+var b = bunker(src)
+-------------------
+
+Create a new bunker code coverageifier with some source `src`.
+
+The bunker object `b` is an `EventEmitter` that emits `'node'` events with two
+parameters:
+
+* `node` - the [burrito](https://github.com/substack/node-burrito) node object
+* `stack` - the stack, [stackedy](https://github.com/substack/node-stackedy) style
+
+b.include(src)
+--------------
+
+Include some source into the bunker.
+
+b.compile()
+-----------
+
+Return the source wrapped with burrito.
+
+b.run(context={})
+-----------------
+
+Run the source using `vm.runInNewContext()` with some `context`.

0 comments on commit 24eb49b

Please sign in to comment.