2021-10-16 20:08:15 +08:00
|
|
|
<h1 align="center">Vite ⚡ - Vue 2 starter template</h1>
|
2021-02-24 06:04:09 +08:00
|
|
|
|
2021-10-16 20:08:15 +08:00
|
|
|
<p align="center">
|
2021-03-02 04:56:40 +08:00
|
|
|
Create a Vue 2 application bundled by the lightning fast build tool <a href="https://github.com/vitejs/vite">Vite</a>
|
2021-03-02 04:48:42 +08:00
|
|
|
</p>
|
2021-02-24 06:04:09 +08:00
|
|
|
|
2021-10-16 20:08:15 +08:00
|
|
|
<p align="center">
|
2021-03-02 04:56:40 +08:00
|
|
|
<a href="https://vite-vue2-starter.netlify.app"> ✨ Live Demo</a>
|
2021-03-02 04:48:42 +08:00
|
|
|
</p>
|
2021-02-24 06:04:09 +08:00
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
## Features
|
2021-02-27 06:12:33 +08:00
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
* ⚡️ [Vite](https://github.com/vitejs/vite), [Vue 2](https://github.com/vuejs/vue) - lightning fast
|
2021-09-12 03:34:35 +08:00
|
|
|
* 📦 [Components auto importing](https://github.com/antfu/unplugin-vue-components)
|
2022-01-28 03:18:13 +08:00
|
|
|
* 📥 [APIs auto importing](https://github.com/antfu/unplugin-auto-import) - use Composition API and others directly
|
|
|
|
* 🚦 [Vue-Router](https://github.com/vuejs/vue-router)
|
|
|
|
* 🎨 [Windi CSS](https://github.com/windicss/vite-plugin-windicss) - next generation utility-first CSS framework
|
|
|
|
* 😃 [Use icons from any icon sets, with no compromise](https://github.com/antfu/unplugin-icons)
|
|
|
|
* 🧰 [VueUse](https://github.com/vueuse/vueuse) - Collection of essential Vue Composition Utilities
|
2022-07-06 22:31:30 +08:00
|
|
|
* 🦾 Typescript, of course
|
2021-09-12 03:34:35 +08:00
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
## Vite plugins
|
2021-02-27 06:12:33 +08:00
|
|
|
|
2022-07-06 22:31:30 +08:00
|
|
|
* [`@vitejs/plugin-vue2`](https://github.com/vitejs/vite-plugin-vue2) -
|
2021-02-27 06:12:33 +08:00
|
|
|
Vue 2 support for Vite
|
2021-09-12 03:34:35 +08:00
|
|
|
* [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) -
|
2022-01-28 03:18:13 +08:00
|
|
|
importing Vue components on-demand
|
2022-09-23 18:27:16 +08:00
|
|
|
* [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) -
|
2022-01-28 03:18:13 +08:00
|
|
|
importing APIs like CompositionAPI on-demand
|
2022-09-23 18:27:16 +08:00
|
|
|
* [`vite-plugin-windicss`](https://github.com/windicss/vite-plugin-windicss) -
|
2022-01-28 03:18:13 +08:00
|
|
|
easy WindiCSS integration
|
2021-09-12 03:34:35 +08:00
|
|
|
* [`unplugin-icons`](https://github.com/antfu/unplugin-icons) -
|
2022-01-28 03:18:13 +08:00
|
|
|
importing icons as Vue components on-demand
|
2021-02-27 06:12:33 +08:00
|
|
|
|
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
## Try it now!
|
2021-03-02 04:48:42 +08:00
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
### GitHub Template
|
2021-03-02 04:48:42 +08:00
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
[Create a repo from this template on GitHub](https://github.com/lstoeferle/vite-vue2-windicss-starter/generate)
|
2021-03-02 04:48:42 +08:00
|
|
|
|
2022-09-23 18:27:16 +08:00
|
|
|
### Clone
|
2021-03-02 04:48:42 +08:00
|
|
|
|
|
|
|
If you prefer to do it manually with a cleaner git history
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npx degit lstoeferle/vite-vue2-windicss-starter my-vite-vue2-app
|
|
|
|
cd my-vite-vue2-app
|
2024-02-25 05:49:22 +08:00
|
|
|
pnpm install
|
2021-03-02 04:48:42 +08:00
|
|
|
```
|
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
## Usage
|
2021-03-02 04:48:42 +08:00
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
### Development
|
2021-03-02 04:48:42 +08:00
|
|
|
|
2022-01-28 04:08:26 +08:00
|
|
|
Just run and visit [http://localhost:3333](http://localhost:3333)
|
2021-03-02 04:48:42 +08:00
|
|
|
|
|
|
|
```bash
|
2024-02-25 05:49:22 +08:00
|
|
|
pnpm dev
|
2021-03-02 04:48:42 +08:00
|
|
|
```
|
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
### Build
|
2021-03-02 04:48:42 +08:00
|
|
|
|
|
|
|
To build the App, run
|
|
|
|
|
|
|
|
```bash
|
2024-02-25 05:49:22 +08:00
|
|
|
pnpm build
|
2021-03-02 04:48:42 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
And you will see the generated files in `dist`, which are ready to be served.
|
|
|
|
|
2022-01-28 03:18:13 +08:00
|
|
|
## Why
|
2021-03-02 04:48:42 +08:00
|
|
|
|
2021-10-16 19:54:17 +08:00
|
|
|
Vue 3 is awesome, but we should not forget about supporting Vue 2 ♥️
|
2022-01-28 03:18:13 +08:00
|
|
|
|
|
|
|
### Credits
|
|
|
|
|
|
|
|
This project is inspired by [Vitesse](https://github.com/antfu/vitesse), an opinionated Vite starter template for Vue 3.
|
|
|
|
|
|
|
|
Big thanks to [Anthony Fu](https://github.com/antfu) for the inspiration and all the amazing tools you create.
|