forked from nprapps/interactive-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I started this scaffolding in 2014, at the Seattle Times. It's more than 10 years old now. It still works pretty well. But the ecosystem has changed a great deal since this was originally built out, and Grunt was not state of the art even then. Ideally we would like to replace both parts of the equation--both initial setup and the task runner itself.
- npm init supports running an initializer in the form of
npm create @chalkbeat/interactive(transformed intonpm exec @chalkbeat/create-interactive. Most of our setup logic could be moved into this pretty easily--we could either eliminate the interactive questions, or pull in a quick module to get those from the user for templating. Most of what we do is just copying files here, after all. - Running tasks is not generally complicated, and I think we could probably just use a variation of the DG Next CLI system. However, there are some things I would like to retain:
- Grunt lets us run some tasks (such as file watching and the HTTP server) in parallel. This is a useful property to have, especially if we were to have tasks that run on a timer (such as an election update service).
- Being able to compose tasks from other tasks ("multitasks" in Grunt parlance) is part of what makes our existing setup powerful, and we should also retain this.
- Grunt does not handle async tasks very well, and we should fix that.
I think we could probably write a runner that's largely similar to the Grunt task API, while leaving the mechanics and utility code (globbing, file system operations, templating, etc) to the runtime itself, which has pretty good support at this point.
Metadata
Metadata
Assignees
Labels
No labels