Releases: stylify/packages
Releases · stylify/packages
v0.7.0
What's Changed
- Dependencies update by @Machy8 in #267
- Drop integration for external tools by @Machy8 in #276
- Issue #275
- In short. Integrations are nice at first. But when you need to configure something, which you will, it's just a wrapper around bundler and all of these integrations means only more problems, more bugs and things to learn. One bundler simplifies a lot of things.
- Longer version of "why" #274
- Use the Stylify Bundler instead along with Framework bundlers: How to bundle files. Bundler docs
- Xs breakpoint by @Machy8 in #277 - Now you can use
xs: (min-width: 375px) andtoxs: (max-width: 374px) - #272
Full Changelog: v0.6.2...v0.7.0
A big thanks goes to alirq for a sponsorship.
v0.6.2
v0.6.1
v0.6
What's Changed
- Regular expressions array for selectors areas by @Machy8 in #242
- Configurator cleanup by @Machy8 in #243
@stylify/stylify
Compiler
return thiswas removed fromconfigureandaddMacromethod- Css variables are now enabled by default and all variables are now exported as CSS variables. Also when used within a a property value as
$someVariableit is converted tovar(--someVariable). replaceVariablesByCssVariableswas renamed tocssVariablesEnabled. ThecssVariablesEnabledoption accepts a boolean value that disables CSS variables if thefalsevalue is passed as value.selectorsAreasnow expect regular expressions instead of strings
// 0.5
const compilerConfig = {
selectorsAreas: [
'(?:^|\\s+)class="([^"]+)"',
]
}
// 0.6
const compilerConfig = {
selectorsAreas: [
/(?:^|\s+)class="([^"]+)"/,
]
}Macros
- The
thisobject within the macro callback now contains the compiler instance - Instead of
selectorProperties.add()return an object withproperties: values - Matches
getCapture()method now returns undefined for a default value if capture was not found instead of empty string. This improves comparison formacroMatch.getCapture(0) ?? hasCapturemethod has been removed
// 0.5
const compilerConfig = {
macros: {
macro: ({ macroMatch, selectorProperties, helpers, variables, dev }) => {
selectorProperties.add('property', macroMatch.geCapture(0));
}
}
}
// 0.6
const compilerConfig = {
macros: {
macro(match) {
const { variables, helpers, dev } = this;
return {
['property']: match.getCapture(0),
'another-property': 'value'
}
}
}
}Components
- The
thisobject within the component callback now contains the compiler instance - Component definition now receives RegExpMatch instead of an array of matches. Instead of
matches[0]usegetCapture(0). Matches indexes are now shorter by 1: thefullMatchis the whole reg exp match, and captures contain only additional captures:matches[0]=>match.fullMatchmatches[1]is nowmatch.getCapture(0)
// 0.5
const compilerConfig = {
components: {
'btn:(\\S+)'(match) {
const { variables, helpers, dev } = this;
return `color:${match.getCapture(0)}`
}
}
}Helpers
- The
thisobject within the helper callback now contains the compiler instance
Configurator
- All methods except
getExistingConfigFileswere removed. This method returns paths to existing config files.
Compiler hooks
compiler:newMacroMatch: Now receivesRecord<string, string>instead ofSelectorPropertiesobject
@stylify/bundler
cssVarsDirPath,sassVarsDirPath,lessVarsDirPath,stylusVarsDirPathwere renamed tocssVarsExportPath,sassVarsExportPath,lessVarsExportPath,stylusVarsExportPath. It accepts direct file path (like./path/to/vars.css) to which it will be saved, or only a directoy path./path/to/cssDir. If no file name is provided, thestylify-variablesfile name will be used with correct suffix.
v0.5.33
v0.5.32
v0.5.31
What's Changed
- Fix typo by @MilesPernicious in #225
- Call getElementById('id') instead of querySelector('#id') by @MilesPernicious in #226
- Tunning24 by @Machy8 in #230
New Contributors
- @MilesPernicious made their first contribution in #225
Full Changelog: v0.5.30...v0.5.31
v0.5.30
v0.5.29
v0.5.28
What's Changed
- External variables tunning, Svelte matching area, Astro fix on Windows by @Machy8 in #216
- Bundler configuration hot reload by @Machy8 in #207
- Windows fixes by @Machy8 in #219
Stylify
- Indented CSS variable in generated CSS
Bundler
- Config hot reloading
- Added restart method
- Normalized output file path
Astro
- Fixed Windows build
Nuxt Module
- Fixed Windows build
Nuxt
- Fixed Windows build
- Fixed mangled selectors rewriting in content module
Unplugin
- Added yaml, neon, mdx file formats
- Fixed ignored areas matching
- Fixed duplicated bundler instances
Full Changelog: v0.5.27...v0.5.28