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

(How To) Use the globalize-compiler in build process? #37

Open
sunsande opened this issue Jan 11, 2018 · 2 comments
Open

(How To) Use the globalize-compiler in build process? #37

sunsande opened this issue Jan 11, 2018 · 2 comments

Comments

@sunsande
Copy link

sunsande commented Jan 11, 2018

Here I would like to address the following problem:
if one wants to use the globalize-compiler during the build process of a web project there are no the configuration files for that.
Specifically I am building in .Net in Azure. So I would expect to be able to download the latest package.json, containing only the dependencies needed the globalize-compiler to run - currently these are:
cldr-data
globalize
iana-tz-data
and globalize-compiler itself.
Of course this could change in the future. Thus I expect to get the package.json automatically from the actual repository instead of doing it by myself every time (or at least check if it is actual or leave it as is until the build will break missing some new dependency).

Further one would like to get all of the needed files (globalize-runtime.xxx) ready for copy in the output directory. It is just not nice to go and search in node_modules/globalize/dist.... and look for them ... one can also automatically detect which one are needed. So if for example we do not need globalize-runtime/currency.js it would be automatically not present in the output dir.

And last but not the least: why does the output from the compiler not working with the globalize.js files but needs another globalize-runtime.js files?

Best regards,
Alex

@rxaviers
Copy link
Member

So I would expect to be able to download the latest package.json, containing only the dependencies needed the globalize-compiler to run - currently these are:
cldr-data
globalize
iana-tz-data
and globalize-compiler itself.

Yeap, we need to copy peerDependencies into dependencies.

It is just not nice to go and search in node_modules/globalize/dist.... and look for them ... one can also automatically detect which one are needed. So if for example we do not need globalize-runtime/currency.js it would be automatically not present in the output dir.

It would be better if we had an npm package for each module, and probably use https://www.npmjs.com/package/lerna for that. That means a breaking change and therefore a major bump in the library. I'm open for that, PRs welcome. Ref globalizejs/globalize#467

@klihelp
Copy link

klihelp commented Jun 7, 2019

@rxaviers Any progress on lerna implementation?

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

3 participants