Link your local repositories and dependencies quickly, without any additional knowledge.
Buildable is made to work with each of installation type such as local, global and npx.
It is using pnpm to install and manage dependencies.
Use .npmrc
file to configure this package manager.
Local scope
npm install --save-dev @webeferen/buildable
Global scope
npm install --global @webeferen/buildable
It can be also used via npx
npx @webeferen/buildable [command]
Buildable itself is a CLI tool that doesn't require any additional configuration to run successfully. To get the smoothest experience the recommended way is by doing following steps:
- Call
buildable init
method to create metadata files;- Modify
.buildable
to the state that fits the usecase; - Modify
pnpm-workspaces.yaml
if needed - default ispackages/*
;
- Modify
- Run
buildable install
to make sure that every dependency is installed and linked; - Run desired commands by typing
buildable run XYZ
;
buildable [command] (...options)
This command prints out useful information such as available commands and options.
buildable help
Prints out currently used version of the package
buildable --version
This command generates configuration files which allows modifications to be applied. It will also generate pnpm-workspaces.yaml
file if workspace
flag is set to true.
buildable init (...options)
This command installs and links packages. Under the hood it is using either pnpm-workspaces
if workspaces
is set or pnpm install
in each project.
buildable install (...options)
This command runs specified command for each project inside directory.
buildable run (r) "script name" (...options)
This command generates dependency graph with every dependency inside workspace (linking them with correct versions). Graph only shows relations between local dependencies.
buildable dependency-graph (dg) (...options)
This command generates execution order in which projects should be run to avoid build order issues. It only takes into consideration local dependencies.
buildable execution-order (eo) (...options)
--listeners (-l)
List of comma separated texts when achieve next process can be run (regex check)--only (-o)
List of comma separated projects that will only be run (with their dependencies)--exclude (-e)
List of comma separated packages which should be excluded--path (-p)
Relative path to the directory containing workspace (if any)--config (-c)
Relative path to the configuration file--reload (-r)
List of comma separated packages which can be manually reloaded--workspace (-w)
Sets buildable in workspace mode (default: true)--no-safe
Disables safe mode for running without dependencies
Example configuration can be found here.
There were some cases where buildable was not able to kill child process by itself. If that happens, this command might help to clean the ports up:
kill -9 $(lsof -ti:[port])
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.