https://github.com/kirklin/boot-unplugin
Starter template for unplugin.
https://github.com/kirklin/boot-unplugin
unplugin
Last synced: 2 months ago
JSON representation
Starter template for unplugin.
- Host: GitHub
- URL: https://github.com/kirklin/boot-unplugin
- Owner: kirklin
- License: mit
- Created: 2022-12-13T07:48:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-08T04:00:34.000Z (over 2 years ago)
- Last Synced: 2024-11-20T19:48:31.750Z (about 1 year ago)
- Topics: unplugin
- Language: TypeScript
- Homepage:
- Size: 324 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# boot-unplugin
[](https://www.npmjs.com/package/boot-unplugin)
Starter template for [unplugin](https://github.com/unjs/unplugin).
## Template Usage
To use this template, clone it down using:
```bash
npx degit kirklin/boot-unplugin my-unplugin
```
And do a global replacement of `boot-unplugin` 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 boot-unplugin
```
Vite
```ts
// vite.config.ts
import Starter from "boot-unplugin/vite";
export default defineConfig({
plugins: [
Starter({ /* options */ }),
],
});
```
Example: [`playground/`](./playground/)
Rollup
```ts
// rollup.config.js
import Starter from "boot-unplugin/rollup";
export default {
plugins: [
Starter({ /* options */ }),
],
};
```
Webpack
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require("boot-unplugin/webpack")({ /* options */ })
]
};
```
Nuxt
```ts
// nuxt.config.js
export default defineNuxtConfig({
modules: [
["boot-unplugin/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("boot-unplugin/webpack")({ /* options */ }),
],
},
};
```
esbuild
```ts
import Starter from "boot-unplugin/esbuild";
// esbuild.config.js
import { build } from "esbuild";
build({
plugins: [Starter()],
});
```
## License
[MIT](./LICENSE) License © 2022 [Kirk Lin](https://github.com/kirklin)