browserify / factor-bundle

factor browser-pack bundles into common shared bundles
Other
402 stars 27 forks source link

Browser Unpack Example Does Not Work #76

Open ornj opened 9 years ago

ornj commented 9 years ago
$ 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.

spikebrehm commented 9 years ago

does the bundle directory exist?

ornj commented 9 years ago

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