From 8e2e9ed3eab95f996c7fd0cc7f4e4c30fed654c8 Mon Sep 17 00:00:00 2001 From: purocean Date: Wed, 1 Aug 2018 18:31:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Windows=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +++++++++++++- frontend/package.json | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59409c1f..d5359192 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,19 @@ 6. 在文档中运行 PHP Python Node.js bash 代码块 ## 上手使用 -+ `cd frontend && yarn && yarn run dist && cd ../backend && yarn && node main.js` ++ 安装 + ```bash + # 安装前端 + cd frontend + yarn # or npm i + yarn run dist # or npm run dist + # yarn run dist-win # or npm run dist-win # Windows 用户 + + # 安装后端 + cd ../background + yarn # or npm i + node main.js # 运行 + ``` + 访问 `http://localhost:3000` + 新增文件:`双击目录` + 删除文件/目录:`shift + 右键文件/目录` diff --git a/frontend/package.json b/frontend/package.json index 42a189ab..daf5bceb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,7 +9,8 @@ "start": "npm run dev", "lint": "eslint --ext .js,.vue src", "build": "node build/build.js", - "dist": "npm run build && cp -r dist/* ../static/" + "dist": "npm run build && cp -r dist/* ../static/", + "dist-win": "npm run build && xcopy dist\\* ..\\static\\ /s /e /y" }, "dependencies": { "crypto-js": "^3.1.9-1",