Closed cspeer closed 8 years ago
Ah ok the index.js is for use within node. If you are using it in the browser you need to use the file within the dist folder.
Ill change bower to point to that instead.
Ok I hadnt drafted a release so bower was getting a really old version (not published anything to bower before. Sorry). if you download again from bower you should now get the dist folder. Let me know how you get on with that.
Well, now I get the following error in the browser:
Uncaught ReferenceError: module is not defined
from this line:
module.exports = process.env.GPXPARSE_COV ? require('./lib-cov/gpx-parse') : require('./lib/gpx-parse');
Maybe you are right and I really shouldn't handle the parsing in the user's browser though
are you using the file in the dist folder? dont use the index.js on the client.
Yeah, the bower.json still points to index.js in "main"
On Wed, Feb 10, 2016 at 12:29 PM Elliot Stokes notifications@github.com wrote:
are you using the file in the dist folder? dont use the index.js on the client.
— Reply to this email directly or view it on GitHub https://github.com/elliotstokes/gpx-parse/issues/14#issuecomment-182324731 .
i have pointed it to the file in dist now. See how you get on with that.
Whoop whoop, that works. Thanks a lot, Elliot!
thanks. Any other problems let me know - it's nice to know people are getting some use out of it!
oh I'm getting a lot of use out of it. I was so happy when I discovered your lib! Saves me so much time.
On Wed, Feb 10, 2016 at 12:55 PM Elliot Stokes notifications@github.com wrote:
thanks. Any other problems let me know - it's nice to know people are getting some use out of it!
— Reply to this email directly or view it on GitHub https://github.com/elliotstokes/gpx-parse/issues/14#issuecomment-182332378 .
Hi,
when I use the lib via bower, there are no errors thrown, but the
gpxParse
is not available. I'm not sure but I think if theindex.js
does not actually load all modules thebower.json
should point to a compiled version for the browser in its main attribute.Thanks, Chris