datamade / how-to

📚 Doing all sorts of things, the DataMade way
MIT License
80 stars 12 forks source link

Revise Django / Wagtail project template approach #371

Open hancush opened 1 month ago

hancush commented 1 month ago

Background

Spin off from #318, #278

We have templates for Django and Wagtail projects, but the scaffolding is largely the same, which means we have two places to update code and configs as we refine our stack. We don't always do this, e.g., the Wagtail template is still using Django Compressor instead of WebPack. Moreover, boilerplate code means that our templates must be updated to account for breaking changes when Django / Wagtail have major version releases, and we have not found an easy way to keep other dependencies up to date. Finally, using our cookiecutters isn't very ergonomic, because you have to clone and update this repository, and darn it, I can never find them on first try, even though I'm the one that originally put them in the docker/templates/ directory.

Proposal

I propose three things:

Deliverables

I will rehome the vanilla JavaScript cookiecutter to its own repositories. I will then create a combined Django / Wagtail cookiecutter following the proposal above. All other cookiecutters will be retired.

Timeline

I expect this to take a day or two.

hancush commented 1 month ago

Given a list of dependencies, npm can install them and create a package.json and package-lock.json pinning their versions, e.g.,

npm i react react-dom react-leaflet