Release notes also available on bud.js.org.
Fix: extensions api inconsistencies
This is only relevant if you are writing an extension for bud.js.
All extension lifecycle methods now have a single signature:
interface Method {
(bud: Bud, options: Options): Promise<unknown>
}
This applies to: init
, register
, boot
, afterConfig
, beforeBuild
, make
, apply
and when
.
Improve: @roots/bud-sass
configuration options
The documentation for @roots/bud-sass has been updated.
Global Imports
Use the bud.sass.importGlobal
function to make a scss module available throughout your stylesheets, regardless of scope.
bud.sass.importGlobal('@src/styles/variables')
If you have more than one stylesheet to import, you may use an array:
bud.sass.importGlobal([
'@src/styles/variables',
'@src/styles/mixins',
'@src/styles/functions',
])
Global Values
Use the bud.sass.registerGlobal
function to ensure global styles are made available throughout your sass stylesheets, regardless of scope.
This function differs from bud.sass.importGlobal
in that it can be passed arbitrary values.
bud.sass.registerGlobal('$foo: rgba(0, 0, 0, 1);')
If you want to divide these values up using an array, you may do so.
bud.sass.registerGlobal([
'$foo: rgba(0, 0, 0, 1);',
'$bar: rgba(255, 255, 255, 1);',
])
Improve: bud.alias
Resolved some inconsistencies between the function typings, documentation and implementation.
You are now able to use an array of values for an alias.The first resolvable module found will be used, checking in the order of the supplied array.
Example:
bud.alias('@app', [
bud.path('@src/scripts/app'),
bud.path('@src/scripts/utils'),
])
Finally, you may now also pass false
to ignore a specific module.
You can do this with a signifier or a path:
bud.alias({
'ignored-module': false,
[bud.path('./ignored-module')]: false,
})
For those who remember: this basically replaces null-loader
.
Improve: overlay and indicator web components
The hmr status indicator and client overlay are now using the shadow dom to more or less fully separate their styles from page styles.
All of the @roots/bud-client scripts remain dependency free.
Release information
-
fix(patch): correct extensions api inconsistencies (#1582)
-
improve(patch): improve sass configuration api (#1580)
-
improve(patch): bud.alias (#1581)
-
improve(patch): use shadowdom for client (#1578)
For more information review the diff to see what’s changed.