Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unplugin/unplugin-starter
Starter template for unplugin
https://github.com/unplugin/unplugin-starter
Last synced: 3 months ago
JSON representation
Starter template for unplugin
- Host: GitHub
- URL: https://github.com/unplugin/unplugin-starter
- Owner: unplugin
- License: mit
- Created: 2021-08-24T09:20:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T10:26:11.000Z (6 months ago)
- Last Synced: 2024-05-29T23:36:01.265Z (6 months ago)
- Language: TypeScript
- Size: 289 KB
- Stars: 137
- Watchers: 3
- Forks: 33
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# unplugin-starter
[![NPM version](https://img.shields.io/npm/v/unplugin-starter?color=a1b858&label=)](https://www.npmjs.com/package/unplugin-starter)
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`## Install
```bash
npm i unplugin-starter
```Vite
```ts
// vite.config.ts
import Starter from 'unplugin-starter/vite'export default defineConfig({
plugins: [
Starter({ /* options */ }),
],
})
```Example: [`playground/`](./playground/)
Rollup
```ts
// rollup.config.js
import Starter from 'unplugin-starter/rollup'export default {
plugins: [
Starter({ /* options */ }),
],
}
```
Webpack
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-starter/webpack')({ /* options */ })
]
}
```
Nuxt
```ts
// nuxt.config.js
export default defineNuxtConfig({
modules: [
['unplugin-starter/nuxt', { /* options */ }],
],
})
```> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
Vue CLI
```ts
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-starter/webpack')({ /* options */ }),
],
},
}
```
esbuild
```ts
// esbuild.config.js
import { build } from 'esbuild'
import Starter from 'unplugin-starter/esbuild'build({
plugins: [Starter()],
})
```