Skip to main content

About This Site http://doc.fly2you.cn

About 1 minNotesExplain

About This Site http://doc.fly2you.cnopen in new window

Vue 3 + TypeScript + Vite + VuePress 2 + Element Plus

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docsopen in new window to learn more.

technology-stack

Catalogue

The docs project is created by vite-cli.

├── docs                       // docs catalogue
│   ├── .vuepress              // vuepress
│   │    ├── components        // components
│   │    ├── config            // config file
│   │    ├── public            // static
│   │    ├── styles            // scss
│   │    ├── client.ts         // vuepress client
│   │    ├── config.ts         // vuepress config
│   │    └── theme.ts          // vuepress theme
├── .gitignore                 // gitignore
├── deployDoc.sh               // deploy
└── package.json               // package.json

package.json

{
  "name": "docfly2you",
  "version": "1.0.0",
  "description": "开源微同商城文档",
  "type": "module",
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
  },
  "keywords": [
    "platform-wechat-mall",
    "Java版微信小程序商城"
  ],
  "author": "李鹏军",
  "license": "Apache-2.0",
  "directories": {
    "doc": "docs"
  },
  "dependencies": {
    "@element-plus/icons-vue": "^2.1.0",
    "element-plus": "^2.3.7",
    "gitalk": "^1.8.0",
    "qrcode.vue": "^3.3.3",
    "vue": "^3.3.4",
    "vuepress-theme-hope": "2.0.0-beta.230"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^4.2.3",
    "@vuepress/client": "2.0.0-beta.64",
    "@vuepress/plugin-docsearch": "2.0.0-beta.64",
    "@vuepress/plugin-register-components": "^2.0.0-beta.64",
    "@vuepress/utils": "2.0.0-beta.64",
    "cross-env": "^7.0.3",
    "increase-memory-limit": "^1.0.7",
    "vite": "^4.4.2",
    "vitest": "^0.18.0",
    "vue-baidu-analytics": "^2.2.0",
    "vuepress": "2.0.0-beta.64"
  },
  "repository": {
    "type": "git",
    "url": "https://gitee.com/fuyang_lipengjun/docfly2you.git"
  }
}

install

npm install

# run
npm run docs:dev

if slowly to run:

npm install -g cnpm --registry=https://registry.npm.taobao.org

cnpm i

# run
npm run docs:dev

open chrome http://localhost:8080

build

npm run docs:build

nginx config

server {
    listen 80;
    server_name doc.fly2you.cn;
    
    location / {
        root '/home/doc';
        index index.html;
    }
}