GithubHelp home page GithubHelp logo

dropseed / django-importmap Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 2.0 293 KB

JavaScript import maps for Django

License: MIT License

Python 89.36% HTML 7.65% Shell 2.66% JavaScript 0.34%
django import-maps importmaps javascript

django-importmap's People

Contributors

codingjoe avatar davegaeddert avatar deps-dropseed[bot] avatar github-actions[bot] avatar heyman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

heyman codingjoe

django-importmap's Issues

alter PackageSchema

Hi there,

I found the package schema a bit confusing when adding multiple packages.

Currently, I'd have to do something like this:

[[packages]]
name = "htmx.org"
source = "[email protected]"
[[packages]]
lit = "lit"
source = "[email protected]"

Yet, from Pipenv or Poetry I am more used to something like this:

[[packages]]
htmx.org = "1.9.8"
lit = "3.0.2"

Maybe this is worth a consideration. I know it's a backwards incompatible change, but since this package is in its early days, this could be the perfect time to do such alterations.

Cheers!
Joe

Add "watch" flag with auto-reload support

Hey, first, awesome work!

I saw your todo list and would also like some kind of watch mode that keeps running and just rebuilds the .lock file in case of file changes (see e.g. here: https://stackoverflow.com/questions/6271719/reusing-django-code-auto-reload-functionality-for-custom-management-commands)

An alternative could be to have the template tag to refresh the .lock file IF in DEBUG mode (or any other flag set).
What do you think of that?

(I would love to do a PR for this)

๐Ÿ‘ cool project โญ๏ธ

Hi there ๐Ÿ‘‹,

Just wanted to share some love โค๏ธ
I wanted to upgrade to ESM loading in the browser instead of bundled development for a while now.
This is a great step towards such a future in the Django world.

Please let me know if you have a donation link. I'd love to support this project.
I'd also be happy to contribute. My main interest would be adding support for JS unit tests.

Thanks for working on such a project.

Cheers!
Joe

Local/app JS module files in importmap

I want to add application specific entries to the importmap (e.g. static/some/file.js in development and {{ STATIC_URL }}some/file-[hash].js in production) and not only jspm.io libraries. Since browsers seems to only support a single importmap, I believe I have to inject my entries into the importmap JSON data generated by django-importmap before rendering it in a template.

Is there any plan/interest in having django-importmap support local files? If not, maybe there should be a documented way to extend the importmap?

I believe importmap-rails has support for something like this (though I guess Rails is less "frontend agnostic" than Django, so it might be hard to come up with a good general solution).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.