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

not have AMD browser version #21

Open
icode opened this issue Sep 3, 2014 · 11 comments
Open

not have AMD browser version #21

icode opened this issue Sep 3, 2014 · 11 comments

Comments

@icode
Copy link

icode commented Sep 3, 2014

not have AMD browser version

@briancavalier
Copy link
Member

Hi @IntelligentCode. You can use it in browser environments via browserify, or by using a loader that supports CommonJS, such as RaveJS or curl.

RaveJS is basically a successor to curl. It loads CommonJS without any additional config, and has some nice features like package manager integration (npm and bower).

@icode
Copy link
Author

icode commented Sep 3, 2014

how to configure curl ?

@aaronshaf
Copy link
Contributor

Just use browserify :)

@unscriptable
Copy link
Member

You can use curl.js's cjsm11 loader as shown here. More details are here.

@briancavalier
Copy link
Member

And just to round things out: RaveJS requires no config at all, just use a package manager:

bower install --save rave jiff

// *or* use npm if you prefer--yep, even for browser environments!
npm install --save rave jiff

Then create an html file with a script tag that points at rave, see here for bower and here for npm, and that's it.

@treasonx
Copy link

So sad, I had hoped to use jiff in my requirejs app :)

Its strange I figured it would "just work" like when and rest.

@patrickliechty
Copy link

It wouldn't take that much time to convert it to UMD or Universal Module Definition that would allow it to be loaded in any module loader.

@briancavalier
Copy link
Member

@wwwpol @treasonx @icode If someone were to send a PR for UMD, I wouldn't refuse it :)

@unscriptable
Copy link
Member

Well… not any PR. :) Perhaps we should recommend the same flavor of UMD that when.js follows?

Boilerplate at the bottom and no support for globals (letting browserify handle that).

@briancavalier
Copy link
Member

@unscriptable Yes, agreed, thanks :)

@treasonx
Copy link

Its easy enough to use browserify to convert the module to AMD. I have used browserify with most and it works great.

Seems like having the UMD boilerplate in the code base would be a hassle.

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

6 participants