Make implicit dependencies in lib/*.exec.js explicit.
Opened this issue · 3 comments
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.
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.
couldn't you just do window.draw2d=await import('draw2d');?
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.