90 lines
2.3 KiB
Markdown
90 lines
2.3 KiB
Markdown
This project is a simplified version based on the internationalized version of [vue-pure-admin](https://github.com/pure-admin/vue-pure-admin), focusing on core functionalities and suitable for actual project development.
|
|
|
|
## Installation
|
|
|
|
Please ensure you have installed the following tools:
|
|
|
|
- **Node.js** >=18.18.0 or >=20.9.0 or >=22.0.0
|
|
- **pnpm** >=9
|
|
|
|
### 1. Install Dependencies
|
|
|
|
Run the following command in the project root directory to install all dependencies:
|
|
|
|
```bash
|
|
pnpm install
|
|
```
|
|
|
|
This command will restore the dependency environment exactly according to the [pnpm-lock.yaml](./pnpm-lock.yaml) file, ensuring consistent builds.
|
|
|
|
---
|
|
|
|
## Running the Project
|
|
|
|
### 2. Start the Development Server
|
|
|
|
```bash
|
|
pnpm dev
|
|
```
|
|
|
|
This will start the local development server, accessible by default at: [http://localhost](http://localhost)
|
|
|
|
---
|
|
|
|
## Building for Production
|
|
|
|
If you need to build static resources for production, use the following commands:
|
|
|
|
```bash
|
|
pnpm build
|
|
```
|
|
|
|
To build for the staging environment:
|
|
|
|
```bash
|
|
pnpm build:staging
|
|
```
|
|
|
|
After the build process completes, the generated files will be placed in the [dist/](./dist) directory.
|
|
|
|
---
|
|
|
|
## Deploying with Docker
|
|
|
|
This project supports quick deployment to an Nginx server using Docker.
|
|
|
|
### 3. Build the Docker Image
|
|
|
|
```bash
|
|
docker build -t frontend-template-i18n .
|
|
```
|
|
|
|
### 4. Run the Container
|
|
|
|
```bash
|
|
docker run -d -p 80:80 frontend-template-i18n
|
|
```
|
|
|
|
---
|
|
|
|
## Technical Details
|
|
|
|
- **Build Tool**: Vite + pnpm
|
|
- **Bundle Size**: Default <2.3MB, can be reduced to <350KB after enabling Brotli compression
|
|
- **UI Library**: Element Plus v2.9.0
|
|
- **State Management**: Pinia v2.3.0
|
|
- **Internationalization**: vue-i18n v10.0.5
|
|
- **Styling Solution**: TailwindCSS + SCSS
|
|
- **HTTP Requests**: Axios + Localforage caching
|
|
- **Code Standards**: ESLint + Prettier + Stylelint
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- This template is a lightweight version and does not accept Issues or PRs; please submit feedback to the full version repository.
|
|
- For further performance optimization, consider enabling CDN mode or implementing lazy loading.
|
|
- Third-party libraries may have version compatibility issues; ensure functionality testing when updating dependencies.
|
|
|
|
For detailed documentation, please refer to the [README.md](https://github.com/pure-admin/pure-admin-thin/tree/i18n)
|