@talex-touch/unplugin-export-plugin
v1.2.15
Published
Export unplugin for talex-touch
Maintainers
Readme
TalexTouch # PluginExporter
Export unplugin for talex-touch.
Install
npm i @talex-touch/unplugin-export-pluginNext in your vite.config.js or vite.config.ts
Vite
import TouchPluginExport from '@talex-touch/unplugin-export-plugin/vite'
export default defineConfig({
plugins: [
....,
TouchPluginExport()
],
})Description
Auto Generate Manifest
It will automatically generate a manifest.json when you build.
Auto Wrap Project -> Plugin
Generate a touch-plugin file on the build folder!
For more about it, see the source code.
Build Plugin Package
vite build or vite-ssg build only generate regular Vite artifacts. You need to run the provided CLI to pack them into .tpex:
vite build && tuff builder
# or
vite-ssg build && tuff builderYou can also add a script in package.json:
{
"scripts": {
"build": "vite build && tuff builder"
}
}The CLI will read dist/ and generate dist/out and dist/build folders. The final .tpex file will be in dist/build/.
Extra commands:
tuff help # show command list
tuff about # tool infoYour result can refer to this
dist/
├── out/ # Vite build output
│ ├── index.html
│ ├── assets/
│ └── *.js, *.css
├── build/ # All content packed into tpex (keep)
│ ├── index.html # Copy from out
│ ├── assets/ # out's assets + merged assets
│ ├── *.js, *.css # Copy from out
│ ├── index.js # Project root directory
│ ├── widgets/ # Project root directory
│ ├── preload.js # Project root directory
│ ├── README.md # Project root directory
│ ├── manifest.json # Generated
│ └── key.talex # Generated
└── xxx-1.0.0.tpex # Final plugin packageInspiration
Inspired by vite
Thanks
Contact
You could contact us through [email protected]
