@aklinker1/buildc
Advanced tools
Comparing version 1.1.1 to 1.1.2-alpha1
{ | ||
"name": "@aklinker1/buildc", | ||
"description": "Zero config CLI tool for caching and orchestrating builds in monorepos", | ||
"version": "1.1.1", | ||
"version": "1.1.2-alpha1", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "scripts": { |
# buildc | ||
Zero config CLI tool for caching and orchestrating builds in monorepos. | ||
Zero config CLI tool for caching package builds in monorepos. | ||
@@ -12,8 +12,13 @@ ```sh | ||
```diff | ||
-"build": "unbuild --minify", | ||
+"build": "buildc -- unbuild --minify", | ||
// packages/example/package.json | ||
-"build": "unbuild", | ||
+"build": "buildc -- unbuild", | ||
``` | ||
`build` also supports only building the package's dependencies, not the package itself. Add `buildc --deps-only -- ` before any scripts that needs the dependencies built before running, like tests: | ||
Now when you run the `build` script for that package, it will only rebuild the package if a file has changed. | ||
Additionally, if your package depends on one or more other packages in the monorepo, `buildc` will detect that and run those package's `build` scripts in the correct order! | ||
If you need to ensure a package's dependencies are built before running a command, prefix it with `buildc --deps-only --`: | ||
```diff | ||
@@ -31,8 +36,2 @@ -"test": "vitest", | ||
#### Why Not NX/Turborepo | ||
It's hard to just use the caching feature of NX/Turborepo without completely migrating to the tools, and using them instead of `pnpm`/`bun`, which more developers are familiar with. I found that since build-caching was really the only feature I used from those packages, it wasn't worth migrating to. | ||
Instead, this tools is a simpler version that doesn't add another CLI people have to memorize to use. Well, technically it does, but at the same time, it doesn't get in your way, and I bet people wouldn't even realize it was being called most the time. Which is the goal. | ||
## Config | ||
@@ -57,1 +56,25 @@ | ||
``` | ||
## Other Commands | ||
### `buildc all` | ||
Builds all the packages in your monorepo. Can be ran from any directory inside the monorepo. | ||
### `buildc graph` | ||
Prints a dependency graph showing which packages depend on others. Can be ran from any directory inside the monorepo. | ||
## Debugging | ||
To debug, set the `DEBUG` environment variable to `1`: | ||
```sh | ||
DEBUG=1 pnpm buildc -- unbuild | ||
``` | ||
## Why Not NX/Turborepo? | ||
It's hard to just use the caching feature of NX/Turborepo without completely migrating to the tools, and using them instead of `pnpm`/`bun`, which more developers are familiar with. I found that since build-caching was really the only feature I used from those packages, it wasn't worth migrating to. | ||
Instead, this tools is a simpler version that doesn't add another CLI people have to memorize to use. Well, technically it does, but at the same time, it doesn't get in your way, and I bet people wouldn't even realize it was being called most the time. Which is the goal. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14254
288
78
1