【发布时间】:2013-07-11 11:24:04
【问题描述】:
我正在试验 TypeScript,我正在使用 Notepad++ 编写 TypeScript,并使用 NppExec 插件来编译我的脚本。似乎它应该可以工作,但有一个非常奇怪的问题:NppExec 只在第一条警告/错误消息的文本之前向我显示输出到:。例如,假设编译输出应该是这样的:
C:/temp/tstest/test.ts(26,14): Supplied parameters do not match any signature of call target
C:/temp/tstest/test.ts(33,9): Supplied parameters do not match any signature of call target
我将在 NppExec 控制台窗口中看到的是:
node C:\temp\tstest\node_modules\typescript\bin\tsc.js C:\temp\tstest\test.ts
Process started >>>
C:/temp/tstest/test.ts(26,14): <<< Process finished. (Exit code 1)
================ READY ================
请注意,它在第一个 ): 之后终止了输出。
非常有趣的是,如果我将 JavaScript 引擎从 Node 更改为 cscript(Windows 脚本宿主),那么它可以工作......但需要永远!如果我使用 cscript 执行相同的命令,我会看到以下内容:
cscript C:\temp\tstest\node_modules\typescript\bin\tsc.js C:\temp\tstest\test.ts
Process started >>>
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
C:/temp/tstest/test.ts(26,14): Supplied parameters do not match any signature of call target
C:/temp/tstest/test.ts(33,9): Supplied parameters do not match any signature of call target
<<< Process finished. (Exit code 1)
================ READY ================
关于这个去哪里有什么建议吗?我宁愿使用 Node,因为它更快...
这是一个演示所有这些的视频: http://screencast.com/t/xxgodAU8
编辑: 事实证明,如果您将-w 开关(“监视文件并在更改时重建”开关)传递给 tsc.js,它会在 Node 执行时工作...但它不会只构建一次,它会继续构建,直到你杀死它,这个过程才会结束。
【问题讨论】:
标签: notepad++ typescript nppexec