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

Make implicit dependencies in lib/*.exec.js explicit. #227

Open
Kreijstal opened this issue Jan 14, 2023 · 3 comments
Open

Make implicit dependencies in lib/*.exec.js explicit. #227

Kreijstal opened this issue Jan 14, 2023 · 3 comments

Comments

@Kreijstal
Copy link

Kreijstal commented Jan 14, 2023

I seen there has been 3 years of updates here in the git repo but not on npm... why?

There are implicit dependencies on the /lib/ directory the '.exec.js' convert them into CJS or ES6 so that they can be used as modules inside the code,
that is jQuery, Raphael, Class, and import/require them everytime they're used.
Makes code clearer, easier to read, and more modular.

@Kreijstal Kreijstal changed the title publish new versio on npm? publish new version on npm? Jan 14, 2023
@Kreijstal Kreijstal changed the title publish new version on npm? Make implicit dependencies in lib/*.exec.js explicit. Jan 14, 2023
@freegroup
Copy link
Owner

The reasons for not publishing to npm are just missing skill and time.
I'm using draw2d for https://electra.academy and I need the feature to have draw2d in the global scope. This is not possible if I build up an npm package....or at least I'm not able to do this.

If I include it like this, 'const draw2d = required("draw2d");`, draw2d isn't globally available, which I need. In this case, there is no benefit for me to build an npm package.

@Kreijstal
Copy link
Author

Kreijstal commented Jan 14, 2023

couldn't you just do window.draw2d=await import('draw2d');?

@freegroup
Copy link
Owner

I have tested this in the past, which unfortunately does not work. I do not know why, but other components do not see "draw2d" after using this.

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

2 participants