Skip to main content

Generic purpose collecstatic alternative, with lovely colors

Project description

This app provides a command named collectdir, which works like collectstatic but general purpose, so you need to add 'collectdir' to your settings.INSTALLED_APPS. It can be used to mix Django with frontend frameworks or build tools in NodeJS.

Consider such a project directory tree:

  • project/ - someapp/frontend # <- frontend dir in someapp module of project - otherapp/frontend # <- frontend dir in another INSTALLED_APPS - frontend/ # <- non commited directory, autogenerated from above

You can rebuild project/frontend with command:

# collect all app's frontend/ dir into ./frontend collectdir frontend:./frontend

If it detects a TTY, and watchdog is installed, it will keep running and synchronizing the target directory. To install collectdir with watchdog example:

pip install --user django-collectdir[dev]

Note that in CRUDLFA+, we use js instead of frontend, so if you want to add your own StimulusJS controllers to your bundle you can just add them in your app. And before executing the frontend toolchain, run: collectdir js:./js

Or, for NextJS support: appwatch pages:./pages

Or, for NextJS and React support and also have a components sub dir: appwatch pages:./pages components:./pages/components

Have fun provisionning other frameworks with Django apps :)


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-collectdir, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django-collectdir-1.0.0.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page