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

Allinone JS file contains forward reference errors #52

Closed
sjamaan opened this issue Feb 28, 2014 · 3 comments
Closed

Allinone JS file contains forward reference errors #52

sjamaan opened this issue Feb 28, 2014 · 3 comments

Comments

@sjamaan
Copy link

sjamaan commented Feb 28, 2014

When loading the allinone version in Chromium, I get "Uncaught ReferenceError: ayepromise is not defined". I tried earlier versions but I get different errors with each one (but they're all Uncaught ReferenceErrors, just about a different dependency every time).

I'm using requirejs via a rasterizeHTML shim, if that matters.

The non-allinone version depends on quite a few broken external dependencies: one isn't registered with Bower (ayepromise), one which has no published tags (url), and one (CSSom) which requires a whole lot of hassle building a full version using jake, which won't even install due to a self-signed certificate. So right now the library is unusable because it can't be "installed" from scratch through bower.

@cburgmer
Copy link
Owner

Thanks for the feedback.

I have to say that the bower aspect got kind of neglected. Bower doesn't solve any problems for me that npm can't solve. In addition some of the dependencies aren't available via bower. Currently the bower.json is only used to pull in dev dependencies that are currently not on npm. My plan is to provide proper packaging of rasterizeHTML.js through npm, possibly with documentation how to use browserify to compile a browser bundle of all dependencies.

The allinone version is created by concatenating the dependencies with the artifact. Module export happens through the global window object. I guess that's where requirejs will complain.

I'll try to build the allinone version without exporting anything to the global window object.

cburgmer pushed a commit that referenced this issue Feb 28, 2014
@cburgmer
Copy link
Owner

Both the simple distributable and the allinone package now include a UMD header. Also the dependencies included in the allinone package are now not leaked into the global namespace.

Let me know if that helps with RequireJS.

For the bower dependency issue, I don't have an easy solution to that for now but I am open for suggestions.

@cburgmer
Copy link
Owner

Closing, as per previous comment.

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