-
Notifications
You must be signed in to change notification settings - Fork 4
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
Publish as package for Deno, Node, and the browser #9
Comments
I've tried using the NPM package in the browser with several shims, but it doesn't seem possible right now. The deno-shim package requires and uses many Node APIs. In particular, now I'm stuck at
b/c the "url" package doesn't include Node's The main problem seems to be that Deno's Node shim is monolithic and uses all sorts of Node APIs, which doesn't play nice with the browser. |
What APIs is the code really using? Only the test code uses filesystem-related APIs, right? Maybe we can split off all test code to a separate directory? That would mean that the tests also mimic the “use as library/package” situation more. |
|
Ironic that something (XML parsing) that should be really very portable is an obstacle to portability now... We can also separate out the parsing-part of the Ecore-importer, keeping just the types that an XML parser is supposed to return, with the remark that the XML parser currently used is compatible with that. What do you think? |
Yes, we could try that and see if it improves.
…On Thu, 16 Mar 2023 at 11:56, Meinte Boersma ***@***.***> wrote:
Ironic that something (XML parsing) that should be really very portable is
an obstacle to portability now...
We can also separate out the parsing-part of the Ecore-importer, keeping
just the types that an XML parser is supposed to return, with the remark
that the XML parser currently used is compatible with that. What do you
think?
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHV3NUBYPOXZ5VEU7R6BK3W4LWWHANCNFSM6AAAAAATI5N2IE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
OK, I'll try and do that first, then. By the way: how do you check whether the package works in the browser? Can we integrate that into this repository? |
Currently, I have another project where I manually add the Lioncore dependency and open a demo page in a browser. That could be automated, I think. |
If you have some time and opportunity, it'd be great (“stallar” even 😄) if you could add that! |
I split off the test code and its dependency management to a separate directory in this branch: https://github.com/LIonWeb-org/lioncore-typescript/tree/node-compatibility Can you check whether that'd already solve some of the problems? The next step would probably be to modify |
A stalla is a farm animal shed, so "stallar" doesn't sound that nice lol 🤣 |
Depends on the shed! 😆 (Incidentally: in Dutch “stal” means the same thing, including the derogatory association.) |
Cool! |
OK, I'll just merge that branch into |
Done, and fixed integration test setup as well. I'm closing this issue. Follow-up improvements can be associated with other issues. |
Very happy about this one! |
* #9 build an NPM package. Tested in a Node project. * #9 build an NPM package. Tests now pass for the generated package. * #9 update lock file * #9 provide mod.ts as an entry point for the NPM module * #9 export more symbols for the Node package * #9 build an NPM package. Tested in a Node project. * #9 build an NPM package. Tests now pass for the generated package. * #9 update lock file * #9 provide mod.ts as an entry point for the NPM module * #9 export more symbols for the Node package * Delete scripts/build_npm.ts (wrong merge) * Fix formatting
Involves:
src/index.ts
dist/
which also contains NPM metadata?This issue replaces issues #1 and #5.
The text was updated successfully, but these errors were encountered: