This diff divides the Dagit app into yarn workspaces with their own packages. This gives us flexibility to break Dagit source apart further, treating it more like a library.
The bulk of the diff is the movement of files from dagit/src to dagit/packages/core/src, and can be ignored.
The dagit directory now just contains a package.json that defines these two workspaces and a couple yarn scripts. The workspaces are:
- @dagit/core, at dagit/packages/core
- Exports a couple of root components (for now), contains 99.5% of Dagit source
- Uses babel and tsc builds to produce js and d.ts output for consumption
- Includes a couple of yarn scripts to start watchers, enabling HMR-enabled development of Dagit source while working on the Dagit app
- @dagit/app, at dagit/packages/app
- A thin CRA wrapper that just renders components from @dagit/core, for now. Assume this will become more complex.
Each package has its own ts and lint scripts.
I have also made some changes to dagit/Makefile.
For the most part, the dev and build workflow should remain the same as they are. You'll still run the same make commands to start the app in development mode or for a build. A major change here is that the start command (for dev) will now also kick off the watchers for @dagit/core, so that the app will build and update correctly while you develop it.