Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get example to work #55

Open
blocka opened this issue Jan 29, 2015 · 3 comments
Open

Can't get example to work #55

blocka opened this issue Jan 29, 2015 · 3 comments

Comments

@blocka
Copy link

blocka commented Jan 29, 2015

I'm on ubuntu 14.04 with the latest version of browserify.

I can't get the simple example to work

git clone [email protected]:substack/factor-bundle.git
cd factor-bundle/example/files
mkdir bundle
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

This results in the creation of bundle/common.js but no x.js or y.js

@blocka
Copy link
Author

blocka commented Feb 1, 2015

It seems without adding --full-paths to browserify, the indexes are numeric and thus there's no way (save for providing an rmap, possibly) or matching the input files to the modules.

I have submitted a pull request to fix the documentation (#56)

@terinjokes
Copy link
Contributor

factor-bundle is supposed to work with indexes, as it creates a mapping as the files pass through, passing --full-paths shouldn't be needed.

I'll look when I get a chance.

@blocka
Copy link
Author

blocka commented Feb 1, 2015

I don't see anything like that being created. It's not in the bundle.js after I do this:

cd test/deps
browserify x.js y.js > bundle.js

If I do browser-unpack < bundle.js there is no mention of x.js or y.js...they've become 2 and 3.

Interestingly enough, when I call it as a plugin of browserify: browserify x.js y.js -p [ ../../ -o bundle/x.js -o bundle/y.js ] -o bundle/common.js it does work correctly.

This is great, but it doesn't fit my workflow (I don't know all the js ahead of time, and I'm calling browserify with a glob.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants