GithubHelp home page GithubHelp logo

Work as a node.js module? about ecma402 HOT 5 OPEN

ibm-js avatar ibm-js commented on May 17, 2024
Work as a node.js module?

from ecma402.

Comments (5)

srl295 avatar srl295 commented on May 17, 2024

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

from ecma402.

rxaviers avatar rxaviers commented on May 17, 2024

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.

from ecma402.

srl295 avatar srl295 commented on May 17, 2024

@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?

from ecma402.

JCEmmons avatar JCEmmons commented on May 17, 2024

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

from ecma402.

cjolif avatar cjolif commented on May 17, 2024

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.

from ecma402.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.