-
Notifications
You must be signed in to change notification settings - Fork 10
Description
The Start project inspired me to make a fork based on RxJs. It's called Hark. I thought I'd share it here in case anyone found it interesting. Documentation is sorely lacking but check out the harkfile.ts to get an idea of how it works.
https://github.com/sparebytes/hark
The big changes are:
- It uses RxJs under the hood in to help facilitate complex asynchronous interactions. It also helps ensure that certain tasks are only executed once. EG, only build the
modelsproject once even if both theapianduiprojects are requesting themodelsproject to be built at the same time. - You build your own CLI using clipanion because you might want to provide special params, eg
--watch, for certain tasks. - Base classes for handling monorepos are provided. These classes are extended to describe tasks that can be run on the monorepo as a whole and tasks which are specific to each package.
Here is an example build --watch scenario with Hark:

As you can see, the API server doesn't start until the first time all of the dependencies have finished (Babel API sources, TTypescript of models). In this example, we might be using Typesmith to transform the models directly into validation functions. Whenever a change occurs, dependents are notified. In this case, the API will restart if either the API or the Models complete a compilation. It also has a debouncer to ensure it won't needlessly restart too many times in a short period of time.