Open ericgj opened 11 years ago
Try a trailing slash in lib
?
On Sun, Jan 13, 2013 at 2:28 PM, Eric Gjertsen notifications@github.comwrote:
Apologies to ask this support question here, but I didn't see anywhere else to ask. I cannot get browserbuild to work as described in the README. I am sure it's something basic I'm missing.
If I have files b.js and hithere.js as described in the README (all, including the main, in a lib directory), and run browserbuild as described, the output I get looks like this:
// require functions wrapperrequire.register("lib/b.js", function(module, exports, require, global){ ... });require.register("lib/hithere.js", function(module, exports, require, global){ ... });var exp = require('hithere');if ("undefined" != typeof module) module.exports = exp;else hithere = exp;
And I get an error trying to require('hithere'), since it was registered as 'lib/hithere.js'.
I thought perhaps the base path needed to be provided, e.g. browserbuild -m hithere -b lib ..., but that doesn't work either as it registers it as '/hithere.js' .
The only way I could get it to work is to run within the source dir, e.g. cd lib && browserbuild -m hithere ... .
What am I missing? Thanks in advance.
Eric
— Reply to this email directly or view it on GitHubhttps://github.com/LearnBoost/browserbuild/issues/23.
Guillermo Rauch LearnBoost CTO http://devthought.com
thanks, browserbuild -m hithere -b lib/ ...
seems to work.
BOOM!
On Sun, Jan 13, 2013 at 3:24 PM, Eric Gjertsen notifications@github.comwrote:
thanks, browserbuild -m hithere -b lib/ ... seems to work.
— Reply to this email directly or view it on GitHubhttps://github.com/LearnBoost/browserbuild/issues/23#issuecomment-12202546.
Guillermo Rauch LearnBoost CTO http://devthought.com
Apologies to ask this support question here, but I didn't see anywhere else to ask. I cannot get browserbuild to work as described in the README. I am sure it's something basic I'm missing.
If I have files
b.js
andhithere.js
as described in the README (all, including the main, in a lib directory), and run browserbuild as described, the output I get looks like this:And I get an error trying to
require('hithere')
, since it was registered as 'lib/hithere.js'.I thought perhaps the base path needed to be provided, e.g.
browserbuild -m hithere -b lib ...
, but that doesn't work either as it registers it as '/hithere.js' .The only way I could get it to work is to run within the source dir, e.g.
cd lib && browserbuild -m hithere ...
.What am I missing? Thanks in advance.
Eric