You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wondered whether it would be possible to use dukpy to resolve paths of all css and js files in a node_modules folder.
Currently the necessary function require.resolve('module_name'); does not work.
We could then feed those paths directly into webassets' Bundle().
If we could simply catch and bundle all packages we have downloaded that way, it would alleviate the need to update our Bundle config every time we add dependencies. Or create an elaborate config in the first place.
Hence we would only need to run dukpy.install_jspackage('bootstrap) and it would be automagically made available in our web templates. Thereby we could indeed dismiss npm.
IMHO. This could be one of the hidden superpowers of dukpy. (Opposed to mere transpilations, because we can do this with webassets already.)
The text was updated successfully, but these errors were encountered:
I would be glad to accept a PR that implements what you are describing. In the end dukpy goals is to allow an alternative to nodejs for Python users. Just make sure it doesn't allow access outsidem of the modules path provided to the interpreter as it might be source of security issues.
@amol- First of all thanks so much for putting up this interesting project!
As you have also mentioned webassets in your presentation on EuroPython 2016.
https://www.slideshare.net/__amol__/pyconit7-dukpy-webassets-free-yourself-from-nodejs-chains
I wondered whether it would be possible to use dukpy to resolve paths of all css and js files in a
node_modules
folder.Currently the necessary function
require.resolve('module_name');
does not work.We could then feed those paths directly into webassets'
Bundle()
.If we could simply catch and bundle all packages we have downloaded that way, it would alleviate the need to update our Bundle config every time we add dependencies. Or create an elaborate config in the first place.
Hence we would only need to run
dukpy.install_jspackage('bootstrap
) and it would be automagically made available in our web templates. Thereby we could indeed dismiss npm.IMHO. This could be one of the hidden superpowers of
dukpy
. (Opposed to mere transpilations, because we can do this with webassets already.)The text was updated successfully, but these errors were encountered: