Releases: roots/bud
v5.8.4
This patch prevents a js chunk from being emitted for entrypoints that only contain css.
Changes
v5.8.3
This release fixes multi-instance compatibility in 5.8. It is recommended for users utilizing multiple instances of bud (using bud.make
)
Changelog
v5.8.2
Fixes an error in 5.8 which can cause nested extensions to not be instantiated. Recommended for all users of 5.8.x.
Changes
Also includes version bumps for a large number of dependencies. Review what changed between v5.8.1 and v5.8.2 here.
v5.8.1
Fixes recommended for all users on 5.8.
v5.8.0
Release notes also available on the bud.js.org website.
Heads up
@roots/bud-eslint
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.
@roots/bud-typescript
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.
Flexible extensions
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.
bud.proxy url replacements
You can now substitute in or amend the existing string replacements for proxy responses. See the updated documentation for more details: bud.proxy.
bud.glob
You can glob for files with bud.glob. There is a sync version available as well: bud.globSync.
--editor
flag
Pass 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
flag
Pass the --browser
flag to the build
command to open the built site in your browser.
@roots/sage
bud.useTailwindColors now supports nested color groups. So, you can do stuff like this:
{
blue: {
shade: {
hue: {
'50': '#add8e6',
},
},
group: {
sky: '#87ceeb',
},
},
tomato: '#ff4500',
}
@roots/bud-esbuild
This extension got a big overhaul in v5.8.0. Including unit tests! Check out the updated docs.
core
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.
More information
Big shoutout to everyone who contributed to this release. We're so happy to have you here!
For more information:
v5.7.0
Read the release post on bud.js.org for additional details
🛼 Improvements
🩹 Fixes
- fix: remove rules section from bud-tailwindcss base stylelint config (#1239) props @alexdanylyschyn
- fix: add scss stylelint rules for tailwindcss (#1288) props @joshuafredrickson
- fix: indicator/hmr errors (#1248)
- fix: bud.terser (#1285)
- fix: babel root (#1284)
- fix: bud.alias (#1283)
- fix: error logging (#1290)
Upgrade guide
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.
👀 More information
v5.6.2
v5.6.1
v5.6.0
Performance
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.
Notifier
MacOS notification center notices are fixed. If you don't want them run the cli command with the --no-notify
flag.
bud.path and bud.setPath
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
.
⚠️ Upgrade guide
-
Any calls which referenced
'project'
as the first parameter should have that parameter removed. Examples:bud.path('project')
becomesbud.path()
.bud.path('project', 'directory')
becomesbud.path('directory')
.
-
Any calls which used
src
,dist
,storage
ormodules
as the first parameter should be updated to use the@
prefix. Examples:bud.path('src', 'some-file.js')
becomesbud.path('@src', 'some-file.js')
.- Or, just
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')
becomesbud.setPath('@src', 'js')
Defining modules is a lot easier
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.
More information
Changelog
- 📚 docs: update by @kellymears in #1221
- 📚 docs: add discourse link by @retlehs in #1223
- 🩹 fix: docs fouc by @kellymears in #1222
- ✨ feature: add discourse topic release workflow by @retlehs in #1234
- 🛼 improve: build, cache, compiler by @kellymears in #1229
- 🩹 fix: macos notifier by @kellymears in #1236
Full Changelog: v5.5.0...v5.6.0
v5.5.0
For more information read the 5.5.0 release post.
Features
- 🎉 feature: ssl support by @strarsis & @kellymears in #1069
- 🎉 feature: @roots/sage theme.json support by @kellymears in #1199
Fixes
- 🩹 fix: disable selector-id-pattern in Sage config by @joshuafredrickson in #1209
Full Changelog: v5.4.0...v5.5.0