Skip to content

Commit

Permalink
feat(docs): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rektdeckard committed May 8, 2024
1 parent b8b6c85 commit 3b49d27
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
# @phosphor-icons/unplugin

[![NPM version](https://img.shields.io/npm/v/@phosphor-icons/unplugin?color=a1b858&label=)](https://www.npmjs.com/package/@phosphor-icons/unplugin)

Starter template for [unplugin](https://github.com/unjs/unplugin).
> [!WARNING]
> This plugin is extremely experimental, and is subject to change. Use at your own risk!
## Template Usage
<img src="/meta/phosphor-mark-tight-black.png" width="96" align="right" />

To use this template, clone it down using:

```bash
npx degit unplugin/@phosphor-icons/unplugin my-unplugin
```
# @phosphor-icons/unplugin

And do a global replacement of `@phosphor-icons/unplugin` with your plugin name.
An [unplugin](https://github.com/unjs/unplugin) for transforming your Phosphor Icon imports into static SVG sprite sheets. Multiple frameworks, metaframeworks, and build tooling supported, although very much WIP. Explore all our icons at [phosphoricons.com](https://phosphoricons.com).

Then you can start developing your unplugin 🔥
[![NPM](https://img.shields.io/npm/v/@phosphor-icons/unplugin.svg?style=flat-square)](https://www.npmjs.com/package/@phosphor-icons/unplugin) [![Travis](https://img.shields.io/github/actions/workflow/status/phosphor-icons/unplugin/main.yml?branch=vite&style=flat-square)](https://travis-ci.com/github/phosphor-icons/unplugin)

To test your plugin, run: `pnpm run dev`
To release a new version, run: `pnpm run release`
[![GitHub stars](https://img.shields.io/github/stars/phosphor-icons/unplugin?style=flat-square&label=Star)](https://github.com/phosphor-icons/unplugin)
[![GitHub forks](https://img.shields.io/github/forks/phosphor-icons/unplugin?style=flat-square&label=Fork)](https://github.com/phosphor-icons/unplugin/fork)
[![GitHub watchers](https://img.shields.io/github/watchers/phosphor-icons/unplugin?style=flat-square&label=Watch)](https://github.com/phosphor-icons/unplugin)
[![Follow on GitHub](https://img.shields.io/github/followers/rektdeckard?style=flat-square&label=Follow)](https://github.com/rektdeckard)

## Install
## Installation

```bash
npm i @phosphor-icons/unplugin
npm i -D @phosphor-icons/unplugin
#^ or whatever package manager you use
```

<details>
<summary>Vite</summary><br>

```ts
// vite.config.ts
import Starter from "@phosphor-icons/unplugin/vite";
import PhosphorUnplugin from "@phosphor-icons/unplugin/vite";

export default defineConfig({
plugins: [
Starter({
/* options */
PhosphorUnplugin({
framework: "react",
assetPath: "/assets/phosphor.svg"
}),
],
});
```

Example: [`playground/`](./playground/)
Example: [`playground/react-vite`](./playground/react-vite)

<br></details>

Expand All @@ -50,11 +47,11 @@ Example: [`playground/`](./playground/)

```ts
// rollup.config.js
import Starter from "@phosphor-icons/unplugin/rollup";
import PhosphorUnplugin from "@phosphor-icons/unplugin/vite";

export default {
plugins: [
Starter({
PhosphorUnplugin({
/* options */
}),
],
Expand Down Expand Up @@ -90,6 +87,7 @@ export default defineNuxtConfig({
[
"@phosphor-icons/unplugin/nuxt",
{
framework: "vue",
/* options */
},
],
Expand All @@ -110,6 +108,7 @@ module.exports = {
configureWebpack: {
plugins: [
require("@phosphor-icons/unplugin/webpack")({
framework: "vue",
/* options */
}),
],
Expand All @@ -125,11 +124,17 @@ module.exports = {
```ts
// esbuild.config.js
import { build } from "esbuild";
import Starter from "@phosphor-icons/unplugin/esbuild";
import PhosphorUnplugin from "@phosphor-icons/unplugin/esbuild";

build({
plugins: [Starter()],
plugins: [PhosphorUnplugin({ framework: "react" })],
});
```

<br></details>

## Options



## Usage

0 comments on commit 3b49d27

Please sign in to comment.