zouhangwithsweet/vue-components-lib-seed
概要
:seedling: a vue3.0 components library template. Vue3.0 组件库的次佳实践.
Web・アプリ開発計測したスター増加
- 24時間
- -2
- 7日間
- -2
- 15日間
- -1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルA Vue3 UI library template
Help you quickly create a component library.
- :rocket: dev with
Vite - :airplane: build with
esbuild - :helicopter: generate types with
ts-morph
Docs
power by vitepress
Feature
- :rainbow: Speedy dev & build
- :fireworks: Customize friendly
- :pencil: More beautiful doc, support
ChineseandEnglish. SupportDark Modeby vueuse - :lollipop: Rich scripts, inspired by esbuild-plugin-vue & vue-dts-gen
- :yum: Type friendly
- :truck:
ESM&CJSproduct
How to use
Generate a repository by vue-components-lib-seed
Checklist
- Replace all
my-libwords with your libary name. Just searchmy-liband replace them in VScode.gitignorepackage.jsonvite.config.ts.vitepressscripts...
Install
yarn
Dev
Benefited from
vite-plugin-pages, thesrc/pages/index.vueis the entry page for development. You can visit/[component-name]/demoto check component, likehttp://localhost:3000/#/button/demo.
yarn dev
Build
yarn build
Test
yarn test
Generate entry point
The entry file is the
inputoption for rollup.
yarn gen-entry
Generate Component
A component's name is required for this command.
yarn gen [component\'s name]
Generate dts
npx esno ./scripts/gen-dts.ts
Release
This command will add git tag、generate changelog. You can test your lib with argument
--dry
yarn release [--dry]
Build Docs
:exclamation: Noted: you should run
yarn build:libbefore run this command. Because the docs need the build bundle.
Docs dev
yarn docs:dev
Docs build
yarn docs:build
Docs deploy
Here is a git action. When you push the code to the master branch, the document will be automatically deployed on gh-pages branch.
Then you can set the Github Pages's source on the gh-pages branch.
Use demo code in doc
Take button as an example.
In button.md, insert the following code
:::demo
src/packages/button/demo/demo0.vue
:::
- or
:::demo
src/packages/button/demo/demo*.vue
:::
There is a global component Demos to display all demos.
This is currently the only way to show demo. More info.
Custom doc style
You can add the class in frontmatter, then the <Content> would inherit the class. Of course, the unocss can be used here.
---
class: 'custom-class'
---
Recommended IDE Setup
If Using <script setup>
<script setup> is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use Volar instead of Vetur (and disable Vetur).
Credits
Thanks
eeeeelle :writing_hand:release-script |
|---|
関連プロジェクトを探す
読み込み中…