-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add README for auto-icons module
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# WXT Auto Icons | ||
|
||
## Features | ||
|
||
- Generate extension icons with the correct sizes | ||
- Make the icon greyscale during development | ||
|
||
## Usage | ||
|
||
Install the package: | ||
|
||
```sh | ||
npm i --save-dev @wxt-dev/auto-icons | ||
pnpm i -D @wxt-dev/auto-icons | ||
yarn add --dev @wxt-dev/auto-icons | ||
bun i -D @wxt-dev/auto-icons | ||
``` | ||
|
||
Add the module to `wxt.config.ts`: | ||
|
||
```ts | ||
export default defineConfig({ | ||
modules: ['@wxt-dev/auto-icons'], | ||
}); | ||
``` | ||
|
||
And finally, save the base icon to `<srcDir>/assets/icon.png`. | ||
|
||
## Configuration | ||
|
||
The module can be configured via the `autoIcons` config: | ||
|
||
```ts | ||
export default defineConfig({ | ||
module: ['@wxt-dev/auto-icons'], | ||
autoIcons: { | ||
// ... | ||
}, | ||
}); | ||
``` | ||
|
||
Options have JSDocs available in your editor, or you can read them in the source code: [`AutoIconsOptions`](./src/index.ts). |