@roots/sage
Preset configuration for the Sage WordPress starter theme
Installation​
- npm
- Yarn
- pnpm
npm install @roots/sage --save-dev
yarn add @roots/sage --dev
pnpm add @roots/sage --save-dev
Usage​
The Sage docs cover everything in more detail than can be found here.
Included extensions​
The @roots/sage extension depends on @roots/bud-preset-wordpress which in turn depends on @roots/bud-preset-recommend.
These are the packages which are installed as peers and registered by the @roots/sage main extension:
Extension | Description |
---|---|
@roots/bud-swc | SWC |
@roots/bud-postcss | PostCSS |
@roots/bud-react | React support |
@roots/bud-preset-wordpress | WordPress preset |
Acorn compatibility​
roots/sage is built with the roots/acorn framework. This preset guarantees compatibility with Acorn's API for enqueuing JS and CSS.
If you do not wish to use Acorn to enqueue assets you can disable the Acorn extension:
export default async (bud: Bud) => {
bud.sage.acorn.enable(false)
}
This will restore the default behavior of including the public path (e.g. /app/themes/sage/public
) in entrypoints manifest values.