Skip to main content

Getting started

bud.js is a web-focused build tool with add-on support for Babel, React, PostCSS, Sass, Typescript, esbuild, ESLint, Prettier, and more.

Requirements

  • Node v18.12.1 (LTS). **bud.js** v7.x.x will drop support for Node v16.x.x.
  • yarn v1.22
  • npm v8.3
  • Windows users must use Windows Subsystem for Linux

Installation

Add @roots/bud as a development dependency using your choice of package manager.

npm install @roots/bud --save-dev

Usage

If your project's entrypoint is located at ./src/index.(js|css) you can now compile it using the bud build command. No configuration is required. The bundled code will be output to ./dist/main.(js|css).

For information on customizing the build for your application see the configuration basics guide.

Adding features

bud.js is built modularly. This means features can be added as needed by adding extensions to your project.

The configuration basics guide has more information on how to add extensions, but most of them start and end with installing a package.

For example, you can add babel and postcss support by installing @roots/bud-babel and @roots/bud-postcss:

npm install @roots/bud-babel @roots/bud-postcss --save-dev

Consult the extensions directory for available first-party extensions.

Upgrading bud.js

In general, all dependencies with the @roots/* namespace should share the same version.

To make it easy to keep versions in sync you can use the bud upgrade command.

npm run bud upgrade