High-performance build system that supports SWC, esbuild, and Babel
MIT License
Bot releases are visible (Hide)
Published by kellymears over 2 years ago
A couple minor fixes. Recommended for all users of 5.8.x.
Users of @roots/sage who are using dynamic imports can now use bud.setPublicPath
without causing issues with acorn. It's also fine to continue setting the publicPath in the entry
call.
Fixes an issue with bud.assets
that resulted in the hash not being applied to copied filenames.
Published by kellymears over 2 years ago
These general bugfixes and improvements are recommended for all projects running 5.8.x.
webpack-manifest-plugin
if build.output.publicPath
is undefinedAPP_PUBLIC_PATH
envvar (if present)This release coincides with updated documentation stemming from recurring discourse topics and github issues:
Published by kellymears over 2 years ago
This patch prevents a js chunk from being emitted for entrypoints that only contain css.
Published by kellymears over 2 years ago
Fixes an error in 5.8 which can cause nested extensions to not be instantiated. Recommended for all users of 5.8.x.
Also includes version bumps for a large number of dependencies. Review what changed between v5.8.1 and v5.8.2 here.
Published by kellymears over 2 years ago
Fixes recommended for all users on 5.8.
Published by kellymears over 2 years ago
Release notes also available on the bud.js.org website.
There is an upstream issue (with eslint-webpack-plugin) which causes the linter to show no errors after the initial compilation, regardless of any violations.
Until this is resolved, you should use memory
caching. You can enable this with:
bud.persist('memory')
This issue is present in earlier versions of bud.js.
The typings for the Bud
object in bud.js have been consolidated under a single interface/namespace: Bud
.
If you are using @roots/bud-typescript, please update your config file and any type declarations to use Bud
instead of Framework
.
Sorry for the inconvenience. Consider it a trade for much improved intellisense.
It is now possible, in extensions which support it, to utilize user-defined dependencies over built-in ones (if they are present in the project package.json
).
This means that you can now use Vue 2 instead of Vue 3, if desired. This is done by installing the Vue 2
compatible packages directly. These versions are the ones we currently run integration tests for:
{
"devDependencies": {
"@roots/bud": "latest",
"@roots/bud-vue": "latest"
},
"dependencies": {
"vue": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"vue-loader": "^15.9.4"
}
}
Check out the vue legacy example for a working example of Vue 2 being used with bud.js.
In the future, additional extensions will follow suit. Some may already have support (it's simply not being advertised since this is a new feature).
Note that by utilizing custom versions of packages you are opting in to increased responsibility for your project. We only support what ships with bud.js by default.
You can now substitute in or amend the existing string replacements for proxy responses. See the updated documentation for more details: bud.proxy.
You can glob for files with bud.glob. There is a sync version available as well: bud.globSync.
--editor
flagPass the --editor
flag to the build
command to open errors in your preferred editor. It's required for you to have set your preferred editor with either the EDITOR
or VISUAL
environment variables.
If VISUAL
is set, it will preferred over EDITOR
.
--browser
flagPass the --browser
flag to the build
command to open the built site in your browser.
bud.useTailwindColors now supports nested color groups. So, you can do stuff like this:
{
blue: {
shade: {
hue: {
'50': '#add8e6',
},
},
group: {
sky: '#87ceeb',
},
},
tomato: '#ff4500',
}
This extension got a big overhaul in v5.8.0. Including unit tests! Check out the updated docs.
This release is mainly focused on the [@roots/bud-extensions] API. Extensions can now be registered using ES6 classes. But, they can also be passed around as plain objects, as before.
Documentation is still a work-in-progress but has been largely updated to reflect the new API.
Big shoutout to everyone who contributed to this release. We're so happy to have you here!
For more information:
Published by kellymears over 2 years ago
Read the release post on bud.js.org for additional details
If you were using bud.serve to set SSL options, you'll need to update that call as the function's API has changed slightly:
bud.serve({
url: 'https://my-site.com',
key: '/path/to/site.key',
cert: '/path/to/site.crt',
})
becomes:
bud.serve('https://my-site.com', {
key: '/path/to/site.key',
cert: '/path/to/site.crt',
})
You may pass any other node server options you want or need to using the second parameter.
Published by kellymears over 2 years ago
This small update is recommended for all users of 5.6.x.
Published by kellymears over 2 years ago
This small update is recommended for all users of 5.6.x.
Published by kellymears over 2 years ago
bud is now about 30% faster ð.
There is a new CLI flag --flush
which will force a full recompilation if you feel like something is goofy. It's also recommended to run bud clean
after installing an update.
MacOS notification center notices are fixed. If you don't want them run the cli command with the --no-notify
flag.
TLDR: Way less clunky to work with.
bud.path()
can be called with no parameters will now resolve to the project root.
bud.path('relative/path')
now returns an absolute path from a project relative one.
bud.path('/absolute/path')
is recognized as an absolute path and will not be interpolated.
There are several reserved strings referencing key directories: @src
, @dist
, @storage
, @modules
. The @
prefix is now being used to make it clearer that this is not a normal path.
You can use bud.setPath
to define additional directory aliases:
bud.setPath({'@config': 'app/config/directory'})
bud.path('@config/config-file.json')
// => [root]/app/config/directory/config-file.json
This only applies to the first segment and only when the @ symbol is prefixed. app/@alias/example
will not work.
This does not automatically make webpack aliases from a path. To use the same convention in your client scripts you still need to use bud.alias
.
Any calls which referenced 'project'
as the first parameter should have that parameter removed. Examples:
bud.path('project')
becomes bud.path()
.bud.path('project', 'directory')
becomes bud.path('directory')
.Any calls which used src
, dist
, storage
or modules
as the first parameter should be updated to use the @
prefix. Examples:
bud.path('src', 'some-file.js')
becomes bud.path('@src', 'some-file.js')
.bud.path('@src/some-file.js')
.Any calls to bud.setPath
which referenced those magic strings also needs to be updated. Example:
bud.setPath('src', 'js')
becomes bud.setPath('@src', 'js')
Want to add support to bud for some arcane syntax? Great news, the API for loaders
, items
and rules
just got a nice upgrade.
Here's typescript.
app.build
.setLoader('ts', 'ts-loader')
.setItem('ts', {loader: 'ts', options: {}})
.setRule('ts', {test: /\.tsx?/, use: [`babel`, `ts`]})
If you just want to modify an existing rule, there is lots for you in this update:
app.bulid.rule.ts.setUse([`babel`, `ts`])
app.build.loaders.ts.setSrc(`alternate-ts-loader`)
app.build.items.ts.setOptions({...options})
Extension authors should take advantage of how all properties for loader, item, and rule definitions can be expressed with a callback. This means if someone changes their source path later your rule will still be pointed in the right direction.
Full Changelog: https://github.com/roots/bud/compare/v5.5.0...v5.6.0
Published by kellymears over 2 years ago
For more information read the 5.5.0 release post.
Full Changelog: https://github.com/roots/bud/compare/v5.4.0...v5.5.0
Published by kellymears over 2 years ago
@roots/eslint-config
package. If you are using a @roots
eslint config please use the appropriate export from @roots/eslint-config
instead. These exports will be removed in 5.5.0.--log
flag.@roots/sage
users no longer need to specify paths in package.json
. You can remove the bud
key entirely.ð
Full Changelog: https://github.com/roots/bud/compare/v5.3.2...v5.4.0
Published by kellymears over 2 years ago
Full Changelog: https://github.com/roots/bud/compare/v5.3.1...v5.3.2
Published by QWp6t over 2 years ago
Full Changelog: https://github.com/roots/bud/compare/v5.3.0...v5.3.1
Published by kellymears over 2 years ago
@roots/bud-typescript
@roots/bud-typescript/eslint-config
.@roots/bud-typescript/tsconfig/tsconfig.json
. For the most part this config is identical to the Microsoft recommended tsconfig except that it allows jsx/tsx to be passed through to @roots/bud-babel
.@roots/bud-sage
domReady
function is available for import from @roots/sage/client
.@bud.assets
In 5.2.0 it was required to use absolute paths with this function. That was a temporary solution; you can now pass copy items in a variety of ways â including as a standard copy-webpack-plugin
options object.
bud doctor
by @kellymears in https://github.com/roots/bud/pull/1059
bud build
command by @kellymears in https://github.com/roots/bud/pull/1063
bud.assets
function by @kellymears in https://github.com/roots/bud/pull/1114
Full Changelog: https://github.com/roots/bud/compare/v5.2.0...v5.3.0
Published by kellymears over 2 years ago
A big change for dependency management with a couple very important bug fixes.
bud.setPublicPath
is deprecated when using the @roots/sage
preset.
Setting the public path in roots/sage will break builds now that it is no longer needed (it'll end up doubling up URLs in Acorn). We know that's annoying so @roots/sage
(the extension) overrides setPublicPath
with a function that intentionally lets the passed value fall through.
The function is flagged as @deprecated
and will be marked as such in most modern IDEs. You should remove it from your config before roots/sage leaves beta.
See improve(server) proxy middleware (#1008)
In Bud v5.0.0 and v5.1.0 it became very clear that the framework's way of handling dependency management was not working anywhere near as well as we had hoped it would. I'd estimate over half of the problems brought up had to do with mismatched dependencies.
The bud install
command was meant to make it easy. I wouldn't say it made it harder, but it definitely didn't make it easy.
For v5.2.0 we're doing something really different and much more in keeping with other tools that work similarly to bud (nextjs, create-react-app, etc). We're going to include the batteries.
This means users do not need to specify anything in package.json
outside of the extension they want to use. So, if you want to try @roots/bud-sass
you just install the extension. No need to run bud install
or manually add sass
. It should already be at the top level of node_modules
, a proper peer to your project, ready to be resolved.
Compare the roots/sage manifest from 5.1.0:
"devDependencies": {
"@babel/eslint-parser": "^7.16.5",
"@roots/bud": "^5.1.0",
"@roots/bud-eslint": "^5.1.0",
"@roots/bud-postcss": "^5.1.0",
"@roots/bud-prettier": "^5.1.0",
"@roots/bud-stylelint": "^5.1.0",
"@roots/bud-tailwindcss": "^5.1.0",
"@roots/sage": "^5.1.0",
"@wordpress/browserslist-config": "4.1.0",
"eslint": "8.6.0",
"postcss": "8.4.5",
"postcss-import": "14.0.2",
"postcss-nested": "5.0.6",
"postcss-preset-env": "7.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"tailwindcss": "3.0.8",
"prettier": "2.5.1"
}
to the one for 5.2.0:
"devDependencies": {
"@roots/bud": "5.2.0",
"@roots/bud-eslint": "5.2.0",
"@roots/bud-postcss": "5.2.0",
"@roots/bud-prettier": "5.2.0",
"@roots/bud-stylelint": "5.2.0",
"@roots/bud-tailwindcss": "52.0",
"@roots/sage": "5.2.0"
}
It seems like it's going to be a lot more manageable. For bud users and maintainers.
Users can still override the installed version of any dependency by installing it themselves. Bud has also relaxed its verison requirements to be much more tolerant of discrepencies.
See improve(bud) dependency strategy (#1005)
When relevant, all extensions now come with a stylelint export for you to use as a starting point.
Here's a config that works well with tailwindcss
:
{
"extends": [
"@roots/bud-stylelint/config",
"@roots/bud-tailwindcss/stylelint-config"
]
}
And if a user wants to try tailwindcss
in a sass
stylesheet, they no longer need to figure out how to do that themselves.
{
"extends": [
"@roots/sage/stylelint-config",
"@roots/bud-tailwindcss/stylelint-config",
"@roots/bud-sass/stylelint-config"
]
}
This release should be able to close the door on issues like [#731] CSS lint errors for SCSS stylesheet files (e.g. Unknown word
; ...)
Here's the list of modules:
extension | export |
---|---|
@roots/bud-stylelint |
'@roots/bud-stylelint/config' |
@roots/bud-tailwindcss |
'@roots/bud-tailwindcss/stylelint-config' |
@roots/bud-sass |
'@roots/bud-sass/stylelint-config' |
@roots/sage |
'@roots/sage/stylelint-config' |
There are a number of configs available to use in your eslint config as a base:
module.exports = {
root: true,
extends: [
require.resolve('@roots/sage/eslint-config'),
require.resolve('@roots/bud-prettier/eslint-config'),
],
}
Here's the list of modules:
extension | export |
---|---|
@roots/bud-eslint |
'@roots/bud-eslint/eslint-config' |
@roots/bud-babel |
'@roots/bud-babel/eslint-config' |
@roots/bud-preset-wordpress |
'@roots/bud-preset-wordpress/eslint-config' |
@roots/bud-preset-recommend |
'@roots/bud-preset-recommend/eslint-config' |
@roots/bud-prettier |
'@roots/bud-prettier/eslint-config' |
@roots/bud-react |
'@roots/bud-react/eslint-config' |
@roots/sage |
'@roots/sage/eslint-config' |
publicPath
no longer needed for proxy ðINVALID_URL
error message emitted by HPM
loggerbud.use
was not configured behind a facade. It is now a synchronous interface over an asynchronous function (like the rest of the async fns in @roots/bud-api
). This was obviously causing issues (see https://github.com/roots/bud/issues/1003#issuecomment-1017950712). A unit test has been added to make sure it returns Framework
and not Promise<Framework>
bud.splitChunks
now breaks all of the "dev boilerplate" (think: hot reload scripts, core-js polyfills, webpack client code, ansi parsers, bud's client scripts, etc.) into a separate chunkGroup: vendor/bud.js
. This cleanly separates vendor code (being used by the app), "bud" code, and the application code. This doesn't effect production at all since none of the packages in the bud chunk group are used outside of dev.bud.watch
.Compare: https://github.com/roots/bud/compare/v5.1.0...main
Thanks to everyone who contributed to this release!
Published by kellymears almost 3 years ago
Bud v5.1.0 is a minor release. It includes a couple anticipated features and bug fixes.
There are many fixes and core improvements based on feedback from the v5.0.0 release. Thanks to everyone who filed issues. There are a couple minor breaking changes.
Adds support for webp ð
We now have an automated release process and will be publishing updates much faster. Thanks for your patience! It took a lot of work to get to this place and we think it's going to prove to be worth it for our project and yours.
If you use npm to install bud, you may need to remove dependencies that are shared with bud extensions in order to install the update.
After installation, run npx bud install
followed by npm install
to resolve everything.
In the near future bud will relax semver requirements to address this annoyance.
There are relatively minor breaking changes for users of @roots/bud-imagemin and @roots/sage and one breaking change in core.
If you wanted, consider the bud.path
helper to easily get an absolute path.
Resolve relative to the the src directory:
bud.assets([bud.path('src', 'images/**/*.{jpg,png}')])
Resolve from the root of your project:
bud.assets([bud.path('project', 'src/images/**/*.{jpg,png}')])
In the future, hopefully this will not be a requirement. But for now it is.
We have switched to @squoosh/lib and there is a new configuration API. It should be an easy change. See @roots/bud-imagemin docs.
Users need to opt-in to specific features by installing:
Thanks to everyone who contributed to this release!
Published by QWp6t almost 3 years ago
The most important change
You no longer need to explicitly require an extension in your configuration file or call bud.use
to load it. Bud will automatically load the extensions you have installed.
@roots/bud-cli
has been deprecated. CLI functionality is packaged with @roots/bud
.bud.use
method is now asynchronous.bud.build.make
method is now asynchronous.build
now refers to an asynchronous filter.build.plugins
now refers to an asynchronous filter.bud.extensions.enqueue
can be used to enqueue a plugin and returns Bud instance for chaining.@roots/bud
no longer exports Framework
. Use Bud
or import Framework
from @roots/bud-framework
instead.Yaml, json5 and TypeScript config file support.
Multi-compiler support:
bud.make
will create a new Bud instance for you to configure.bud.get
will retrieve a previously made child instance for further configuration.bud.set
allows setting a Bud instance as a bud.children
entry.bud.root
always returns the parent compiler. If called from the parent it will return itself.bud.isRoot
will be true in the parent context.bud.hasChildren
will be true in the parent context if there are child Bud instances.Several new hooks:
event.build.make.before
is called just before the webpack config is created (async).event.build.make.after
is called just after the webpack config is created (async).event.compiler.before
is called just before the final config is passed to webpack.event.compiler.after
is called just after the final config is passed to webpack.New CLI commands:
New bud build
flags:
true
]filesystem
or memory
. [default: filesystem
]true
]v
, vv
, vvv
, vvvv
) [default: vvv
]--no-log.papertrail
]--log-secret {cwd}
]--dashboard
]example project demonstrating how to use off-the-shelf webpack plugins with bud.use
@roots/bud-typings
has been deprecated.@roots/yarn-plugin-kjo
to provide utilities in the yarn @bud
namespace.The following notes only apply to specific extensions:
@roots/bud-tailwindcss
- updated to version 3.@roots/bud-sass
- uses postcss-scss
to avoid syntax conflicts between sass and postcss.