Skip to content

Releases: forge42dev/vite-plugin-icons-spritesheet

v2.2.1

26 Aug 12:50
Compare
Choose a tag to compare

Fix for assetInlineLimit

Fixed an issue where the spritesheet wasn't picked up in certain conditions

What's Changed

New Contributors

Full Changelog: v2.2.0...v2.2.1

v2.2.0 - Asset Inline Limit support

20 Aug 15:51
Compare
Choose a tag to compare

Vite assetInlineLimit respect

From v2.2.0 The plugin will respect your assetsInlineLimit defined in your Vite config and will only ignore it for the spritesheets generated by the plugin itself, meaning you don't have to opt-out of the inlining of small assets just to use this plugin

Full Changelog: v2.1.0...v2.2.0

v2.1.0 - Multiple configs + formatters

08 Aug 11:33
Compare
Choose a tag to compare

Multiple configs are here!

From 2.1.0 you can pass in an array of configs instead of a single one which will generate multiple watchers and bundles accordingly. Check out the README for details on this!

Full example:

 iconsSpritesheet([
      {
        withTypes: true,
        inputDir: "icons",
        outputDir: "./app/icons",
        formatter: "prettier"
      },
      {
        withTypes: true,
        inputDir: "icons",
        outputDir: "./public/icons",
        formatter: "biome",
        pathToFormatterConfig: "./biome.json",
      }
    ]),

Formatting the outputs!

From 2.1.0 you can specify prettier or biome as formatters which will format your output files before they are generated and then write them to the directories. You can also specify a path to your formatter config to be used by the formatter under the hood via pathToFormatterConfig

Full example:

iconsSpritesheet({
  withTypes: true,
  inputDir: "icons",
  outputDir: "./public/icons",
  // Linter and path to config specified
  formatter: "biome",
  pathToFormatterConfig: "./biome.json",
}),

What's Changed

New Contributors

Full Changelog: v2.0.0...v2.1.0

v2.0.0 - Runs on build

12 Jul 07:47
Compare
Choose a tag to compare

Runs on build

The plugin will now run BEFORE your build starts so the icon artifact is output to the location before the building starts.

Changed the types output

Now uses the generated array to generate the type instead of duplicating both for a smaller file

Full Changelog: v1.3.0...v2.0.0

v1.3.0

11 Jun 12:40
Compare
Choose a tag to compare

Better Vite versioning support

The plugin uses Vite internal helpers to resolve the path but this was causing issues in vite.config.ts where the types were locked to a specific Vite version. The typesafety has been moved inside of the plugin now and the return type ahs been loosened.

Also, Vite is now a peerDependendency instead of a dependency so it can work with a bigger range of Vite versions.

Full Changelog: v1.2.1...v1.3.0

v1.2.1

28 May 10:10
Compare
Choose a tag to compare

What's Changed

  • Configurable TS types output location by @machour in #9

New Contributors

Full Changelog: v1.2.0...v1.2.1

v1.2.0

16 May 11:14
87da244
Compare
Choose a tag to compare

Icon naming conventions

From v1.2.0 onwards you can change and customize your icon naming convention to suite your needs.

What's Changed

  • Added ability to change the icon name convention by @AlemTuzlak in #6

New Contributors

Full Changelog: v1.1.2...v1.2.0

v1.1.2

16 May 10:51
Compare
Choose a tag to compare

Runs on initial vite dev server start

Now the icons will be generated as soon as you start your server.

What's Changed

  • Fix typo in import statement for iconsSpritesheet by @OnurGvnc in #3
  • run generateIcons at startup if sprite.svg does not exist by @OnurGvnc in #4

New Contributors

Full Changelog: v1.1.1...v1.1.2

v1.1.1

14 May 10:35
Compare
Choose a tag to compare

Fixed an issue where if there were no files in the output dir the plugin didn't work properly

Full Changelog: 1.1.0...v1.1.1

1.1.0

12 May 10:53
Compare
Choose a tag to compare

Improvements to writes

Now only writes if there are any changes, does not write on every change.

Listener improvements

Listens to add/delete events as well and outputs the icons when a new one is added or old one is removed.

Full Changelog: 1.0.0...1.1.0