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
- Yarn
npm install @roots/bud --save-dev
yarn add @roots/bud --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
- Yarn
npm install @roots/bud-babel @roots/bud-postcss --save-dev
yarn add @roots/bud-babel @roots/bud-postcss --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
- Yarn
npm run bud upgrade
yarn run bud upgrade