Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aklinker1/buildc

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aklinker1/buildc

Zero config CLI tool for caching and orchestrating builds in monorepos

  • 1.1.0-alpha1
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

buildc

Zero config CLI tool for caching and orchestrating builds in monorepos.

pnpm i -D buildc

Then prefix any package-specific build commands you want to cache with buildc -- :

-"build": "unbuild --minify",
+"build": "buildc -- unbuild --minify",

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:

-"test": "vitest",
+"test": "buildc --deps-only -- vitest",
Supports:
  • PNPM workspaces
  • Bun workspaces

Note that this is a personal tool, and I only plan on supporting the tools I use. If you want to add support for NPM or Yarn, feel free to open a PR!

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

Each package.json can have a buildc field where you can configure options. Listed below are the defaults:

{
  // ...,
  "buildc": {
    // Set to false to disable the cache-checking behavior for this package
    "cachable": true,
    // The directory where your build is output to
    "outDir": "dist",
    // List of glob patterns to include when checking if the package needs rebuilt
    "include": ["src/**/*"],
    // List of glob patterns to ignore when checking if the package needs rebuilt
    "exclude": ["**/__tests__/**", "**/*.test.*", "**/e2e/**"],
  },
}

Keywords

FAQs

Package last updated on 13 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc