CLI tool that run builds for every yarn workspace in your monorepo
When run, this tool will:
- Read your monorepo's package.json
- Use the 'workspaces' key to find all the yarn workspaces in your repo
- For each workspace...
- Read the package.json in the workspace dir
- Load the module or file that the
"workspace-builder"key in the workspace's package.json refers to
- Run the function exported from that file with an object with the following shape:
It also has a watch mode where it does the same thing, but watches each workspace directory's
src dir for changes and re-runs the build when a change occurs.
- Create a monorepo using yarn workspaces
- Add a
"workspace-builder"key to the package.json of each workspace that needs to be built. The value of this key should be the path to/name of a "builder module" or an array of paths to/names of "builder modules".
- Put all your source code for each workspace in its
srcdir. The build output will be written to its
Official builder modules
Here is a list of all the official builder modules available on npm: