[Pkg-javascript-commits] [node-browser-unpack] 06/40: full docs

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 12:27:23 UTC 2017


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

rouca pushed a commit to branch master
in repository node-browser-unpack.

commit 2209709b617674386a8db80cbf6efec78b0048cd
Author: James Halliday <mail at substack.net>
Date:   Mon Dec 23 20:46:26 2013 -0800

    full docs
---
 package.json    |  3 ++-
 readme.markdown | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 5214c89..4983e04 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,8 @@
   },
   "dependencies": {
     "concat-stream": "~1.2.1",
-    "esprima": "~1.0.4"
+    "esprima": "~1.0.4",
+    "minimist": "0.0.5"
   },
   "devDependencies": {
     "browser-pack": "~2.0.0",
diff --git a/readme.markdown b/readme.markdown
index cde0147..2a57952 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -2,3 +2,53 @@
 
 parse a bundle generated by
 [browser-pack](https://npmjs.org/package/browser-pack)
+
+# example
+
+```
+$ node main.js
+129.50502147699586
+$ browserify main.js > bundle.js
+$ browser-unpack < bundle.js
+[
+{"id":"/home/substack/projects/browser-unpack/example/foo.js","source":"module.exports = function (n) { return n * 111 }\n\n","deps":{}}
+,
+{"id":"/home/substack/projects/browser-unpack/example/main.js","source":"var foo = require('./foo.js');\nvar gamma = require('gamma');\n\nconsole.log(foo(gamma(2.3)));","deps":{"./foo.js":"/home/substack/projects/browser-unpack/example/foo.js","gamma":"/home/substack/projects/browser-unpack/node_modules/gamma/index.js"},"entry":true}
+,
+{"id":"/home/substack/projects/browser-unpack/node_modules/gamma/index.js","source":"var g = 7;\nvar p = [\n    0.99999999999980993,\n    676.5203681218851,\n    -1259.1392167224028,\n    771.32342877765313,\n    -176.61502916214059,\n    12.507343278686905,\n    -0.13857109526572012,\n    9.9843695780195716e-6,\n    1.5056327351493116e-7\n];\n\nvar g_ln = 607/128;\nvar p_ln = [\n    0.99999999999999709182,\n    57.156235665862923517,\n    -59.597960355475491248,\n    14.1360979747417471 [...]
+]
+$ browser-unpack < bundle.js | browser-pack | node
+129.50502147699586
+```
+
+# usage
+
+```
+usage: browser-unpack
+
+  Write a browser bundle to STDIN.
+  Outputs a JSON array in the module-deps format.
+
+```
+
+# methods
+
+``` js
+var unpack = require('browser-unpack')
+```
+
+## var rows = unpack(src)
+
+Return an array of `rows` from the bundle source string `src`.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install browser-unpack
+```
+
+# license
+
+MIT

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



More information about the Pkg-javascript-commits mailing list