@naive-potato-ui/build
v1.0.20
Published
A Naive UI component library for Vue 3.
Downloads
6
Readme
@naive-potato-ui/build
Build tools for Naive Potato UI
Generate vite config for child packages
build process
generate vite config
generate common vite config by
generateViteConfig
function, which will be used by all child packages;
plugins
- @vitejs/plugin-vue: for vue single file component;
build production code and style file
- run
pnpm --filter ./packages/** build
to build all packages,which mean runvite build
in each package, generatedist
folder which contains 'es' and 'umd' production code and style file;
generate dts file
- using
vue-tsc
to generate dts file for every vue component and ts file in packages, but those dts file generated in root folder, so we need to move them to each individual package folder's dist folder(need to clean up root dist dir first); - move all dts file to each individual package folder's dist folder by vite plugin hook, and cause vite build didn't care about child package's
types
dir(if it has), so we need to move types dir to each individual package folder's dist folder too;
generate new package.json content and replace it
- now every package has its own dist folder which contains 'es' and 'umd' production code and style file and dts file;
- generate new package.json content and replace the old one;
- name:
@naive-potato-ui
prefix, get package name by folder name, generate kebab-case
- name: