Skip to content

Commit

Permalink
v1.0.0-alpha.4
Browse files Browse the repository at this point in the history
- Fix options bug
  • Loading branch information
ewilan-riviere committed Oct 1, 2023
1 parent 3d30622 commit 5b61946
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const list = svgList; // as Record<SvgName, () => Promise<{ default: string }>>

> **Note**
>
> A demo is available on [Stackblitz](https://stackblitz.com/github/ewilan-riviere/unplugin-svg-transformer-example?file=README.md) or directly on [github.com/ewilan-riviere/unplugin-svg-transformer-example](https://github.com/ewilan-riviere/unplugin-svg-transformer-example).
> A demo is available on [Stackblitz](https://stackblitz.com/github/ewilan-riviere/unplugin-svg-transformer-example) or directly on [github.com/ewilan-riviere/unplugin-svg-transformer-example](https://github.com/ewilan-riviere/unplugin-svg-transformer-example).
## Features

Expand Down
4 changes: 2 additions & 2 deletions live/nuxt3/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions live/nuxt3/types/icons.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-svg-transformer
export {};

declare global {
export type SvgName = 'download' | 'social/twitter' | 'vite-3' | 'vite' | 'default'
interface Window {
ust: {
options: { cacheDir?: string, global: boolean, libraryDir?: string, svgDir?: string, useTypes: boolean, isTesting: boolean, isNuxt: boolean, nuxtDir: string, fallback: string, svg: { classDefault?: string[], clearSize: 'all' | 'parent' | 'none', clearClass: 'all' | 'parent' | 'none', clearStyle: 'all' | 'parent' | 'none', currentColor: boolean, inlineStyleDefault?: string[], sizeInherit: boolean, title?: boolean }, warning: boolean }
svgList: Record<SvgName, () => Promise<{ default: string }>>
importSvg: (name: SvgName) => Promise<string>
}
}
}

declare module 'vue' {
export interface GlobalComponents {
SvgIcon: typeof import('unplugin-svg-transformer/dist/vue')['SvgIcon']
}
}
4 changes: 2 additions & 2 deletions live/vue3/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "unplugin-svg-transformer",
"type": "module",
"version": "1.0.0-alpha.3",
"version": "1.0.0-alpha.4",
"description": "Import easily your SVG with Vite.",
"author": "kiwilan <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function isTesting(): Promise<boolean> {
return false
}

export default createUnplugin<Options | undefined>(options => ({
export default createUnplugin<PluginOptions | undefined>(options => ({
name: 'unplugin-svg-transformer',
async buildStart() {
const opts = Path.convertOptions(DEFAULT_OPTIONS, options)
Expand Down

0 comments on commit 5b61946

Please sign in to comment.