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

Work as a node.js module? #64

Open
srl295 opened this issue Aug 5, 2014 · 5 comments
Open

Work as a node.js module? #64

srl295 opened this issue Aug 5, 2014 · 5 comments
Assignees

Comments

@srl295
Copy link

srl295 commented Aug 5, 2014

I didn't investigate this much, but it looks like the library can't load under node (define is not defined). Is it possible?

@srl295
Copy link
Author

srl295 commented Aug 8, 2014

Think the answer may lie in adding requirejs boilerplate or using amintercept

@rxaviers
Copy link

rxaviers commented Aug 8, 2014

Hey @srl295, someone from the project might give a better answer, but as I can tell this implementation uses pure AMD modules. So, you need to use an AMD loader (eg. amd-loader). Although, I'm not sure how to deal with the json plugins.

In order to avoid such dependency and to get Node.js supported natively, the distribution files could be UMD wrapped.

@srl295
Copy link
Author

srl295 commented Aug 8, 2014

@rxaviers Hi! Nice to see you here also besides ICU! amd-loader looks pretty easy to use. Wonder if just adding the right npm-visible stuff to this project (maybe a node-intl.js or something that just has require('amd-loader'); global.exports = require('./Intl') or something like that?

@JCEmmons
Copy link
Member

I'm hoping @clmath can give me some guidance here. We do want the package to work properly under Node.js.

@cjolif
Copy link
Contributor

cjolif commented Nov 12, 2014

I think there are two things here, the packaging for which UMD (see @rxaviers link) is probably the solution we want to go with and the fact all the modules are loading/working correctly on Node.JS and here I think @clmath found some issues that need to be fixed.

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

5 participants