Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/DMaiGit/rsbuild_vue3_h5_template

This project is a template for Vue 3, integrated with RSBuild for development and build processes. It includes popular libraries such as Axios, Pinia, Vant, and Vue Router.
https://github.com/DMaiGit/rsbuild_vue3_h5_template

Last synced: 3 months ago
JSON representation

This project is a template for Vue 3, integrated with RSBuild for development and build processes. It includes popular libraries such as Axios, Pinia, Vant, and Vue Router.

Lists

README

        

๐Ÿš€ RSBuild Vue3 H5 Template ๐ŸŒŸ



๐Ÿ›  This Vue 3 template, integrated with RSBuild, streamlines development and build processes with popular libraries such as Axios, Pinia, Vant, and Vue Router. ๐Ÿ“š


๐Ÿ‡ฌ๐Ÿ‡ง English
ย |ย 
๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡

---

## ๐Ÿ—‚ Table of Contents

- [Requirements](#-requirements)
- [Project Structure](#-project-structure)
- [Quick Start](#-quick-start)
- [Features](#-features)

## ๐Ÿ“‹ Requirements

- **Node.js** >= 20 ๐ŸŸข
- **npm** >= 10 ๐Ÿ“ฆ
- **Vue** 3 โšก
- **Vue Router** >= 4 ๐Ÿšฆ
- **Pinia** >= 2 ๐ŸŒฒ
- **TypeScript** >= 5 ๐Ÿ“˜
- **Vant-Ui** 4 ๐Ÿ“ฑ
- **Axios** >= 1.6 ๐ŸŒ

> **๐Ÿ’ก Tip**: ๐Ÿš€ Use PNPM to unlock RSBuild's full debug capabilities! ๐Ÿ›  Without PNPM, you might miss out on `rsbuild`'s debug features.

## ๐Ÿ“ Project Structure

Below is the tree structure of the project, providing an overview and purpose of each file and directory:

```plaintext
root
โ”œโ”€โ”€ .husky/ # Husky hooks for enforcing good commit practices
โ”œโ”€โ”€ .vscode/ # VSCode specific settings
โ”œโ”€โ”€ dist/ # Compiled files ready to be deployed
โ”œโ”€โ”€ public/ # Public assets that will not be processed by Webpack
โ”‚ โ”œโ”€โ”€ favicon.ico # Favicon for the website
โ”‚ โ””โ”€โ”€ index.html # Entry HTML for the application
โ”œโ”€โ”€ src/ # Source code of the application
โ”‚ โ”œโ”€โ”€ @types/ # TypeScript typings specific to the project
โ”‚ โ”œโ”€โ”€ api/ # API service functions and setup
โ”‚ โ”œโ”€โ”€ assets/ # Static assets such as images and global styles
โ”‚ โ”‚ โ””โ”€โ”€ images/ # Images used within the application
โ”‚ โ”œโ”€โ”€ components/ # Reusable Vue components
โ”‚ โ”œโ”€โ”€ mock/ # Mock data for testing and development
โ”‚ โ”œโ”€โ”€ routes/ # Application routing definitions
โ”‚ โ”œโ”€โ”€ static/ # Static files that are copied to the output directory
โ”‚ โ”‚ โ””โ”€โ”€ fonts/ # Fonts used in the application
โ”‚ โ”œโ”€โ”€ stores/ # Pinia stores for state management
โ”‚ โ”œโ”€โ”€ styles/ # Global and modular styles
โ”‚ โ”œโ”€โ”€ utils/ # Utility and helper functions
โ”‚ โ”œโ”€โ”€ views/ # Vue components that act as pages
โ”‚ โ”‚ โ””โ”€โ”€ main/ # Main views of the application
โ”‚ โ”œโ”€โ”€ App.vue # Root Vue component
โ”‚ โ”œโ”€โ”€ env.d.ts # Environment variable typings for TypeScript
โ”‚ โ””โ”€โ”€ index.ts # Main entry point for the Vue application
โ”œโ”€โ”€ .browserslistrc # Browser compatibility configuration
โ”œโ”€โ”€ .editorconfig # Coding style definitions for IDEs
โ”œโ”€โ”€ .env.development # Environment variables for development
โ”œโ”€โ”€ .env.local # Local environment variables
โ”œโ”€โ”€ .env.production # Environment variables for production
โ”œโ”€โ”€ .eslintrc.js # ESLint rules and configurations
โ”œโ”€โ”€ .gitignore # Specifies files to be ignored in version control
โ”œโ”€โ”€ commitlint.config.js # Configuration for commit message linting
โ”œโ”€โ”€ package.json # Project metadata and dependencies
โ”œโ”€โ”€ postcss.config.js # Configuration for PostCSS
โ”œโ”€โ”€ README.md # The descriptive file for the project
โ”œโ”€โ”€ README.zh-CN.md # Chinese version of the README, provides project details for Chinese-speaking users.
โ”œโ”€โ”€ rsbuild.config.ts # Configuration file for RSBuild, which is used to define and manage build tasks and project build settings.
โ”œโ”€โ”€ tailwind.config.js # Tailwind CSS configuration file, used to customize Tailwind's default settings to match the project's design requirements.
โ””โ”€โ”€ tsconfig.json # TypeScript compiler configuration file, defines how TypeScript compiles the code.
```

## ๐Ÿš€ Quick Start

```bash
npm install # ๐Ÿ“ฆ Install project dependencies
npm run dev # ๐ŸŒˆ Start the development server
npm run dev-debug # ๐Ÿ” Start with RSBuild debug
npm run build # ๐Ÿ— Build for production
npm run build-debug # ๐Ÿ”ง Build for production with RSBuild debug
npm run preview # ๐ŸŽฅ Preview the built project
npm run test # ๐Ÿงช Run tests (not specified yet)
npm run prepare # ๐Ÿ“Œ Prepare Husky
npm run commit # ๐Ÿ’ฌ Run Commitizen for commits
```

## โœจ Features
- Vue 3: Progressive JavaScript framework for UI development. ๐ŸŽ‰
- Axios: Promise-based HTTP client. ๐ŸŒ
- Pinia: State management for Vue. ๐Ÿ—ƒ
- Vant: Mobile-first Vue UI library. ๐Ÿ“ฑ
- Vue Router: Official router for Vue.js. ๐Ÿ›ฃ
- TypeScript: JavaScript with type safety. ๐Ÿ“œ
- Tailwind CSS: Utility-first CSS framework. ๐Ÿ’…
- ##### ๐Ÿ›  Development Tools and Libraries
- @commitlint/cli & @commitlint/config-conventional: Ensures commit messages follow the conventional commit format. ๐Ÿ“
- cross-env: Sets environment variables across platforms. ๐ŸŒ
- eslint-plugin-vue & @typescript-eslint/eslint-plugin: Provides linting for Vue and TypeScript files. ๐Ÿ”
- husky & commitizen: Manages Git hooks and commit message formats. ๐Ÿถ
- vue-tsc & tailwindcss: Supports type checking for Vue and utility-first styling with Tailwind CSS. ๐ŸŽจ