Skip to content

vtrbo/starter-unplugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

---plugin-name---

NPM version

---plugin-name--- for unplugin.

Forked from antfu/unplugin-starter

Template Usage

example use @vtrbo/cli

example use @vtrbo/ni

Clone this template

vtr
# select Unplugin

# or
# vtr vtrbo/starter-unplugin my-plugin

Globally replace ---plugin-name--- with your plugin name.

Globally replace ---PluginName--- with your plugin name (big camel case).

Then you can start developing your plugin.

To test your plugin, run nr dev.

To release your plugin, run nr release.

Install

npm i ---plugin-name---
Vite
// vite.config.js
import ---PluginName--- from '---plugin-name---/vite'

export default defineConfig({
  plugins: [---PluginName---({ /* options */ })],
})


Rollup
// rollup.config.js
import ---PluginName--- from '---plugin-name---/rollup'

export default {
  plugins: [---PluginName---({ /* options */ })],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('---plugin-name---/webpack')({ /* options */ })
  ]
}


Nuxt
// nuxt.config.js
export default {
  buildModules: [
    ['---plugin-name---/nuxt', { /* options */ }],
  ],
}

This module works for both Nuxt 2 and Nuxt Vite


Vue CLI
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('---plugin-name---/webpack')({ /* options */ }),
    ],
  },
}


Esbuild
// esbuild.config.js
import { build } from 'esbuild'
import ---PluginName--- from '---plugin-name---/esbuild'

build({
  plugins: [---PluginName---({ /* options */ })],
})


License

MIT License © 2022 Victor Bo

About

💿 Template For Unplugin.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project