Skip to content

Resolving modules paths possible? #19

Description

@pykong

@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.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions