webpack-unpack
extract modules from a bundle generated by webpack
Last updated 3 years ago by goto-bus-stop .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-unpack 
SYNC missed versions from official npm registry.

webpack-unpack

extract modules from a bundle generated by webpack

npm travis standard

Install

npm install webpack-unpack

Usage

Pipe a bundle to it:

$ webpack-unpack < bundle.js
[
{"id":0,"source":"exports.test=function(t){console.log(t)},exports.boop=\"beep\"","deps":{}}
,
{"id":1,"source":"var n,r,o=module.exports={};/*..snip..*/","deps":{}}
,
{"id":2,"source":"(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var /*..snip..*/","deps":{"1":1}}
,
{"id":3,"source":"var r=require(2);require(0).test(r.join(\"whatever\",\"lol\"))","deps":{"0":0,"2":2}}
]

The output is a JSON array in the module-deps format.

API

var unpack = require('webpack-unpack')

var modules = unpack(source)

Return an array of module-deps objects from the bundle source string source.

License

Apache-2.0

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

5 Versions

  • 2.0.0                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 8
Last Day 0
Last Week 1
Last Month 17
Dependencies (6)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |