Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Mar 28, 2024
1 parent 50409a0 commit 32700a9
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,39 @@
# unplugin-starter
# Stencil Unplugin

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

Starter template for [unplugin](https://github.com/unjs/unplugin).

## Template Usage

To use this template, clone it down using:

```bash
npx degit unplugin/unplugin-starter my-unplugin
```

And do a global replacement of `unplugin-starter` with your plugin name.

Then you can start developing your unplugin 🔥

To test your plugin, run: `pnpm run dev`
To release a new version, run: `pnpm run release`
An unplugin that wraps the [Stencil](https://stenciljs.com/) compiler to be used within Astro, Esbuild, Nuxt, Rollup, rspack, Vite and Webpack etc. environments.

## Install

To install this unplugin, run:

```bash
npm i unplugin-starter
npm i unplugin-stencil
```

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

```ts
// vite.config.ts
import Starter from 'unplugin-starter/vite'
import stencil from 'unplugin-stencil/vite'

export default defineConfig({
plugins: [
Starter({ /* options */ }),
stencil({ /* Stencil configuration overwrites */ }),
],
})
```

Example: [`playground/`](./playground/)

<br></details>

<details>
<summary>Rollup</summary><br>

```ts
// rollup.config.js
import Starter from 'unplugin-starter/rollup'
import Starter from 'unplugin-stencil/rollup'

export default {
plugins: [
Expand All @@ -68,7 +53,7 @@ export default {
module.exports = {
/* ... */
plugins: [
require('unplugin-starter/webpack')({ /* options */ })
require('unplugin-stencil/webpack')({ /* options */ })
]
}
```
Expand All @@ -82,7 +67,7 @@ module.exports = {
// nuxt.config.js
export default defineNuxtConfig({
modules: [
['unplugin-starter/nuxt', { /* options */ }],
['unplugin-stencil/nuxt', { /* options */ }],
],
})
```
Expand All @@ -99,7 +84,7 @@ export default defineNuxtConfig({
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-starter/webpack')({ /* options */ }),
require('unplugin-stencil/webpack')({ /* options */ }),
],
},
}
Expand All @@ -113,7 +98,7 @@ module.exports = {
```ts
// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'unplugin-starter/esbuild'
import Starter from 'unplugin-stencil/esbuild'

build({
plugins: [Starter()],
Expand Down

0 comments on commit 32700a9

Please sign in to comment.