Metadata-Version: 2.1
Name: django-collectdir
Version: 1.0.0
Summary: Generic purpose collecstatic alternative, with lovely colors
Home-page: https://git.yourlabs.org/oss/django-collectdir
Author: James Pic
Author-email: jamespic@gmail.com
License: MIT
Keywords: django
Classifier: Development Status :: 1 - Planning
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: dev
Requires-Dist: watchdog<0.9,>=0.8.3; extra == "dev"

Django-CollectDir: general purpose collectstatic alternative
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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
    manage.py 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::

    manage.py collectdir js:./js

Or, for NextJS support::

    manage.py appwatch pages:./pages

Or, for NextJS and React support and also have a components sub dir::

    manage.py appwatch pages:./pages components:./pages/components

Have fun provisionning other frameworks with Django apps :)

.. image:: screenshot.png
