mixu / gluejs

Build CommonJS modules for the browser via a chainable API
http://mixu.net/gluejs/
165 stars 13 forks source link

Fix for #31 #32

Closed srquinn21 closed 10 years ago

srquinn21 commented 10 years ago

Fixes https://github.com/mixu/gluejs/issues/31#issuecomment-34024256

srquinn21 commented 10 years ago

@mixu Sorry about that, I wrote that first commit in haste. I quickly realized the next moment I had to think about it that it was just moving the error into another place. New commit will default to process.cwd() which I believe is a good sane default. I'll of course defer to your preference there. At least now my latest commit doesn't throw the same error it sought to fix =)

mixu commented 10 years ago

no problem. Looks reasonable, though your branch seems to be behind from the current glue2 branch so I had to cherry pick the commits in. You probably want to do something like the stuff documented here: https://help.github.com/articles/syncing-a-fork

Also fixed a typo with the variable name (homePath).

Thanks again!

mixu commented 10 years ago

BTW, I'm working on getting static analysis (e.g. detecting require() calls from source) into gluejs, as it enables a couple of nice use cases. Most notably the ability auto-detect node_modules dependencies without explicit --include management.

Right now I've been working on improving the cache API so I can perform some of these more expensive operations and cache the results (e.g. https://github.com/mixu/minitask/blob/master/cache.md ). Next, I'll try to make use of the extracted metadata..

srquinn21 commented 10 years ago

Thanks! Thought I had pulled from upstream first – again, working too fast! Let me know how things progress with static analysis. Could be very useful and I suspect any efforts towards caching will be critical given the expense. I think that is why TJ went with manifest files.