From d18d8de6ef9aae1bee2aabded2c74157345fa1fa Mon Sep 17 00:00:00 2001 From: cpongo2 Date: Mon, 17 Oct 2022 07:10:58 +0000 Subject: [PATCH] update --- package.json | 2 +- preview.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 preview.yml diff --git a/package.json b/package.json index 9b44ef4..7b2a37a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "http-server" }, "repository": { "type": "git", diff --git a/preview.yml b/preview.yml new file mode 100644 index 0000000..4cfbc24 --- /dev/null +++ b/preview.yml @@ -0,0 +1,10 @@ +# preview.yml +autoOpen: true # 打开工作空间时是否自动开启所有应用的预览 +apps: + - port: 3000 # 应用的端口 + run: npm i && npm run dev # 应用的启动命令 + command: # 使用此命令启动服务,且不执行run + root: ./ # 应用的启动目录 + name: My App # 应用名称 + description: 我的第一个 App。 # 应用描述 + autoOpen: true # 打开工作空间时是否自动开启预览(优先级高于根级 autoOpen \ No newline at end of file -- GitLab