From a12813c3461cef1620701ef00dd14f5fb506c45d Mon Sep 17 00:00:00 2001
From: 62e00738167f7e3ed361db3c <62e00738167f7e3ed361db3c@devide>
Date: Wed, 2 Nov 2022 01:31:43 +0000
Subject: [PATCH] =?UTF-8?q?preview.yml=20=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 5 ++++-
JavaScript-Snake/package.json | 4 +++-
preview.yml | 5 +++--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 75856f8..1288704 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
.sass-cache/
-node_modules
\ No newline at end of file
+node_modules
+package-lock.json
+
+.cache
diff --git a/JavaScript-Snake/package.json b/JavaScript-Snake/package.json
index a8e13a4..4f2da9c 100644
--- a/JavaScript-Snake/package.json
+++ b/JavaScript-Snake/package.json
@@ -4,6 +4,7 @@
"description": "JavaScript Snake
By Patrick Gillespie
License: MIT
http://patorjk.com/games/snake",
"main": "index.html",
"scripts": {
+ "dev": "live-server .",
"start": "parcel index.html --open",
"build": "parcel build index.html",
"test": "echo \"Error: no test specified\" && exit 1"
@@ -20,6 +21,7 @@
"homepage": "https://github.com/patorjk/JavaScript-Snake#readme",
"dependencies": {},
"devDependencies": {
- "parcel-bundler": "^1.6.1"
+ "parcel-bundler": "^1.6.1",
+ "live-server": "^1.2.2"
}
}
diff --git a/preview.yml b/preview.yml
index bd0c657..ee1fff0 100644
--- a/preview.yml
+++ b/preview.yml
@@ -2,9 +2,10 @@
autoOpen: false # 打开工作空间时是否自动开启所有应用的预览
apps:
- port: 5500 # 应用的端口
+ # run: npm i && npm run dev # 应用的启动命
run: npm i && npm run dev # 应用的启动命
command: # 使用此命令启动服务,且不执行run
- root: ./ # 应用的启动目录
- name: 2048 # 应用名称
+ root: ./JavaScript-Snake # 应用的启动目录
+ name: Snake # 应用名称
description: 我的第一个 App。 # 应用描述
autoOpen: true # 打开工作空间时是否自动开启预览(优先级高于根级 autoOpen
--
GitLab