|
1 | 1 | # Vue 3 Component Library Starter Template |
2 | 2 |
|
3 | | -[](https://github.com/starter-collective/starter-lib-vue3/releases) |
4 | | -[](https://www.npmjs.com/package/starter-lib-vue3) |
5 | | - |
| 3 | +[](https://github.com/starter-collective/starter-lib-vue3/releases) |
| 4 | +[](https://www.npmjs.com/package/starter-lib-vue3) |
| 5 | +[](https://github.com/starter-collective/starter-lib-vue3/actions/workflows/ci.yml) |
| 6 | +[](https://app.netlify.com/sites/starter-lib-vue3/deploys) |
6 | 7 | Vue 3 component library starter template, provides VitePress documentation, supports building ESM, CJS and IIFE formats. |
7 | 8 |
|
8 | 9 | - [Live Demo](https://starter-lib-vue3.netlify.app/) |
9 | 10 | - [Play on Stackblitz](https://stackblitz.com/github/starter-collective/starter-lib-vue3) |
10 | | -- [README for 中文](./README.zh.md) |
| 11 | + |
| 12 | +## Features |
| 13 | + |
| 14 | +- Build package with [Vite](https://vite.dev/guide/build.html#library-mode) - Library mode with no config. |
| 15 | +- Out-of-the-box unit testing with [Vitest](https://github.com/vitest-dev/vitest). |
| 16 | +- [VitePress](https://vitepress.dev/) documentation - Deploy on [Netlify](https://app.netlify.com/) with zero-config, supports other deployment methods as well. |
| 17 | +- Manage versions using the [bumpp](https://github.com/antfu-collective/bumpp), and publish to npm with zero-configPublish to [npm](https://www.npmjs.com) with zero-config. |
| 18 | + |
| 19 | +## Usage |
| 20 | + |
| 21 | +[Create a repo](https://github.com/starter-collective/starter-lib-vue3/generate) from this template on GitHub. |
| 22 | + |
| 23 | +```bash |
| 24 | +git clone <git remote url> |
| 25 | +``` |
| 26 | + |
| 27 | +Install npm dependencies. |
| 28 | + |
| 29 | +```bash |
| 30 | +cd starter-lib-vue3 # Or your project directory |
| 31 | + |
| 32 | +pnpm i # If you don't have pnpm installed, run: npm install -g pnpm |
| 33 | +``` |
| 34 | + |
| 35 | +Just run `dev` script to build your files. |
| 36 | + |
| 37 | +```bash |
| 38 | +pnpm dev |
| 39 | +``` |
| 40 | + |
| 41 | +Open documentation for the library, you can run: |
| 42 | + |
| 43 | +```bash |
| 44 | +pnpm docs:dev |
| 45 | +``` |
| 46 | + |
| 47 | +To build the library, you can run: |
| 48 | + |
| 49 | +```bash |
| 50 | +pnpm build |
| 51 | +``` |
| 52 | + |
| 53 | +If you want to publish it, you can run: |
| 54 | + |
| 55 | +```bash |
| 56 | +pnpm release |
| 57 | +``` |
| 58 | + |
| 59 | +## Clean Template |
| 60 | + |
| 61 | +If you prefer to do it manually with the cleaner git history: |
| 62 | + |
| 63 | +```bash |
| 64 | +npx degit starter-collective/starter-lib-vue3 |
| 65 | + |
| 66 | +cd starter-lib-vue3 |
| 67 | + |
| 68 | +pnpm i # If you don't have pnpm installed, run: npm install -g pnpm |
| 69 | +``` |
| 70 | + |
| 71 | +When you use this template, try follow the checklist to update your info properly: |
| 72 | + |
| 73 | +- [ ] Change the package name in `package.json` and the global `iife` variable in `tsup.config.ts`. |
| 74 | +- [ ] Update the website information, favicon, and logo icons in `docs/*`. |
11 | 75 |
|
12 | 76 | ## License |
13 | 77 |
|
14 | | -[MIT License](./LICENSE) © 2024 [Kieran Wang](https://github.com/kieranwv/) |
| 78 | +[MIT License](./LICENSE) © 2024-PRESENT [Kieran Wang](https://github.com/kieranwv/) |
0 commit comments