从STDIN而不是文件编译打字稿代码?

时间:2019-01-22 17:11:37

标签: typescript

我正在构建一个(简单的)命令行工具,该工具将一个临时的打字稿文件写入磁盘,然后通过$$(document).on(‘DOMContentLoaded’, function(){ app.dialog.alert(‘Device Ready!’); var pushwoosh = cordova.require(“pushwoosh-cordova-plugin.PushNotification”); // Should be called before pushwoosh.onDeviceReady document.addEventListener(‘push-notification’, function(event) { var notification = event.notification; // handle push open here app.dialog.alert(‘Hello!’); }); // Initialize Pushwoosh. This will trigger all pending push notifications on start. pushwoosh.onDeviceReady({ appid: “XXXXX-XXXXX”, projectid: “xxxxxxxxxxx”, serviceName: “MPNS_SERVICE_NAME” }); }); 对文件进行类型检查。

我想通过STDIN将代码发送到tsc /tmp/foo/bar.ts --noEmit,而不是在tsc中写文件。

如何在发送到/tmp的代码上运行tsc --noEmit

0 个答案:

没有答案