Skip to content

Discussion: RxJs based fork of @start  #55

@sparebytes

Description

@sparebytes

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:

  1. 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 models project once even if both the api and ui projects are requesting the models project to be built at the same time.
  2. You build your own CLI using clipanion because you might want to provide special params, eg --watch, for certain tasks.
  3. 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:
Hark Diagram

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions