正确的启动项目
Opened this issue · 4 comments
FishOrBear commented
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 commented
不用改啥,然后vscode那启动一个watch任务。修改了就自动编译了。
FishOrBear commented
嗯 仓库里面好像没watch的命令,
"build": "tsc -watch"
chexiongsheng commented
好像我这里不用改啥,就这配置,在vscode上“Terminal -> Run Build Task ”选tsc watch即可。
FishOrBear commented
嗯 这个方法也行