我很难找到答案.具有普通 node .JS,你可以用node path/to/file.js
运行任何JS文件,用CoffeeScript它是coffee hello.coffee
,ES6有babel-node hello.js
.我如何用Typescript做同样的事情?
我的项目有一个tsconfig.json
,Webpack/ts loader使用它为浏览器构建了一个很好的小Bundle 包.不过,在此之前,我需要从控制台运行构建步骤,这将使用项目中使用的.ts
个文件中的一些文件来生成模式,但如果不编译整个项目,我似乎无法运行单个Typescript文件.