v0.5.0
@stylify/stylify
Plain Selectors
renamed toCustom selectors
- Components and custom selectors now accepts only string instead of an array of strings and etc.
- Components and custom selectors can have nested selectors
const components = {
'button': `
cursor:pointer
.icon { color:yellow }
> {
.icon, span { vertical-align:middle }
}
`
}
- Custom selectors can be generated directly from selector within the markup
- Stylify packages now use hookable system instead of properties and configurations
- Runtime now uses Hookable system, instead of dom custom event
- Rewrite selectors method now doesn't need compilation result because it uses the MinifiedSelectorsGenerator register.
- Macro functions now receive one object without changing
this
object:
'macro': ({ macroMatch, selectorProperties, helpers, variables, dev }) => {
// ...
}
- The Rewrite Selectors method now accepts an object instead of two arguments or a string.
.rewriteSelectors({ content, rewriteOnlyInSelectorsAreas, matchSelectorsWithPrefix })
- The Rewrite Selectors method now accepts a new argument:
matchSelectorsWithPrefix
that causes to match element according to the given prefix during compilation => If matched selector had to be class, the prefix is.
and is rewritten as.selector
instead ofselector
. - The Minified Selectors Generator now returns a character with prefix if defined.
@stylify/bundler
- When waiting on the Bundler to process, the
await bundler.waitOnBundlesProcessed()
can be called on its own. It now internally waits on the bundle() method to finish. Theawait bundler.bundle()
. Can be removed if is used to wait on the Bundler before another step in the build. - When generated or rewritten content is the same as in the file, that file is not overridden. This decreases the amount of "file saved" triggers during development. If the file doesn't exist, it is created.
@stylify/unplugin
- Transform method is triggered only when selectors are rewritten. Otherwise, it just returns code that was passed as argument
- When a new config is passed, the
getBundler()
method now waits on the previous bundler to finish and then creates a new bundler during development
What's Changed
Full Changelog: v0.4.0...v0.5.0