diff --git a/.gitignore b/.gitignore index 75856f8b49f54ec39d2e564fcaa0587c8c8b6b78..1288704e1dae7d21b3589c8601a753a82794ad6a 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 a8e13a4874a3e20aaadfb547d2e77e985e1551aa..4f2da9cbd6de9205114907029ac0473ff81a0f3e 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 bd0c6575e7c9e7cc85966edce3358238bb4c163f..ee1fff021087027dff8ebdc607c2c8d9784c0c80 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