Skip to content

Releases: stylify/packages

v0.7.0

11 Apr 19:35
Compare
Choose a tag to compare

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) and toxs: (max-width: 374px) - #272

Full Changelog: v0.6.2...v0.7.0

A big thanks goes to alirq for a sponsorship.

v0.6.2

18 Jun 14:20
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.1...v0.6.2

v0.6.1

28 May 21:24
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6...v0.6.1

v0.6

13 May 16:53
Compare
Choose a tag to compare

What's Changed

@stylify/stylify

Compiler

  • return this was removed from configure and addMacro method
  • 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 $someVariable it is converted to var(--someVariable).
  • replaceVariablesByCssVariables was renamed to cssVariablesEnabled. The cssVariablesEnabled option accepts a boolean value that disables CSS variables if the false value is passed as value.
  • selectorsAreas now expect regular expressions instead of strings
// 0.5
const compilerConfig = {
  selectorsAreas: [
	'(?:^|\\s+)class="([^"]+)"',
  ]
}

// 0.6
const compilerConfig = {
  selectorsAreas: [
	/(?:^|\s+)class="([^"]+)"/,
  ]
}

Macros

  • The this object within the macro callback now contains the compiler instance
  • Instead of selectorProperties.add() return an object with properties: values
  • Matches getCapture() method now returns undefined for a default value if capture was not found instead of empty string. This improves comparison for macroMatch.getCapture(0) ??
  • hasCapture method 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 this object within the component callback now contains the compiler instance
  • Component definition now receives RegExpMatch instead of an array of matches. Instead of matches[0] use getCapture(0). Matches indexes are now shorter by 1: the fullMatch is the whole reg exp match, and captures contain only additional captures:
    • matches[0] => match.fullMatch
    • matches[1] is now match.getCapture(0)
// 0.5
const compilerConfig = {
  components: {
     'btn:(\\S+)'(match) {
        const { variables, helpers, dev } = this;
        return `color:${match.getCapture(0)}`
     }
  }
}

Helpers

  • The this object within the helper callback now contains the compiler instance

Configurator

  • All methods except getExistingConfigFiles were removed. This method returns paths to existing config files.

Compiler hooks

  • compiler:newMacroMatch: Now receives Record<string, string> instead of SelectorProperties object

@stylify/bundler

  • cssVarsDirPath, sassVarsDirPath, lessVarsDirPath, stylusVarsDirPath were renamed to cssVarsExportPath, 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, the stylify-variables file name will be used with correct suffix.

v0.5.33

28 Apr 18:03
Compare
Choose a tag to compare

What's Changed

  • feat: reexport bundler hooks from packages by @Machy8 in #240
  • Fix matching and mangling collisions by @Machy8 in #241

Full Changelog: v0.5.32...v0.5.33

v0.5.32

18 Apr 12:57
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.5.31...v0.5.32

v0.5.31

25 Mar 15:00
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.5.30...v0.5.31

v0.5.30

14 Mar 14:25
Compare
Choose a tag to compare

Full Changelog: v0.5.29...v0.5.30

Related issues
#223

v0.5.29

13 Mar 19:27
Compare
Choose a tag to compare

What's Changed

  • feat: Add importDefaultBundle option for disabling defult bundle import by @Machy8 in #222

Full Changelog: v0.5.28...v0.5.29

v0.5.28

04 Mar 15:25
Compare
Choose a tag to compare

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