Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

正确的启动项目 #1

Open
FishOrBear opened this issue Aug 24, 2020 · 4 comments
Open

正确的启动项目 #1

FishOrBear opened this issue Aug 24, 2020 · 4 comments

Comments

@FishOrBear
Copy link
Contributor

FishOrBear commented Aug 24, 2020

1.打开JsProj目录,输入npm i typescript

2.将package.json改成下面的代码.

{
  "name": "tgamejs-demo",
  "version": "0.0.1",
  "description": "tgamejs demo.",
  "scripts": {
    "build": "tsc"
  },
  "author": "johnche",
  "license": "MIT",
  "dependencies": {
    "@types/mocha": "^7.0.1",
    "@types/react": "^15.6.6",
    "@types/react-reconciler": "^0.18.0",
    "typescript": "^4.0.2"
  },
  "devDependencies": {}
}

3.控制台输入npm run build

4.在去启动项目

@chexiongsheng
Copy link
Owner

不用改啥,然后vscode那启动一个watch任务。修改了就自动编译了。

@FishOrBear
Copy link
Contributor Author

嗯 仓库里面好像没watch的命令,

"build": "tsc -watch"

@chexiongsheng
Copy link
Owner

好像我这里不用改啥,就这配置,在vscode上“Terminal -> Run Build Task ”选tsc watch即可。

@FishOrBear
Copy link
Contributor Author

嗯 这个方法也行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants