我找不到一个示例文档,该文档演示了如何通过vscode调试angular2来设置typescript而没有npm 脚本运行器。
Quickstart是一个通用的解决方案,即使IDE不是VSCODE
也可以因此,我只需要一个文档/存储库,了解如何将以下所有命令转换为VSCODE任务,而无需花费数小时来确定正确的语法/结构。
"scripts": {
"build": "tsc -p src/",
"build:watch": "tsc -p src/ -w",
"build:e2e": "tsc -p e2e/",
"serve": "lite-server -c=bs-config.json",
"serve:e2e": "lite-server -c=bs-config.e2e.json",
"prestart": "npm run build",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"pree2e": "npm run build:e2e",
"e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run build",
"test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"",
"pretest:once": "npm run build",
"test:once": "karma start karma.conf.js --single-run",
"lint": "tslint ./src/**/*.ts -t verbose"
},
如果您认为这与其他问题重复,例如Debug & Run Angular2 Typescript with Visual Studio Code? ,请确保提供的答案未使用
该问题的npm start
。例如已接受answer在步骤5中使用