factor-bundle icon indicating copy to clipboard operation
factor-bundle copied to clipboard

Browser Unpack Example Does Not Work

Open ornj opened this issue 10 years ago • 2 comments

$ browserify x.js y.js > bundle.js
$ browser-unpack < bundle.js | factor-bundle \
  x.js -o bundle/x.js \
  y.js -o bundle/y.js \
  > bundle/common.js

bundle/common.js is created. Neither bundle/x.js or bundle/y.js are created. It is my understanding that these bundles should be created with the modules that exist in the common bundle being omitted.

ornj avatar Aug 04 '15 22:08 ornj

does the bundle directory exist?

spikebrehm avatar Aug 12 '15 22:08 spikebrehm

Yes it does. I just attempted this again with a clean directory by doing the following:

npm install browserify browser-unpack factor-bundle
mkdir bundle
cp node_modules/factor-bundle/example/files/* .
browserify x.js y.js > bundle.js
browser-unpack < bundle.js | factor-bundle x.js -o bundle/x.js y.js -o bundle/y.js > bundle/common.js
ls bundle
  common.js

ornj avatar Aug 12 '15 23:08 ornj