From 8f5fe6fc0136e495f869cb17093a3db7cedc7b1e Mon Sep 17 00:00:00 2001 From: Basarat Syed Date: Wed, 22 Apr 2015 17:18:48 +1000 Subject: [PATCH] compile on save doesn't work with `--out`. Refs https://github.com/TypeStrong/atom-typescript/issues/206 --- dist/main/atom/onSaveHandler.js | 2 ++ lib/main/atom/onSaveHandler.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/dist/main/atom/onSaveHandler.js b/dist/main/atom/onSaveHandler.js index 283fa8f5f..2372447b0 100644 --- a/dist/main/atom/onSaveHandler.js +++ b/dist/main/atom/onSaveHandler.js @@ -13,6 +13,8 @@ function handle(event) { parent.getProjectFileDetails({ filePath: event.filePath }).then(function (fileDetails) { if (!fileDetails.project.compileOnSave) return; + if (!fileDetails.project.compilerOptions.out) + return; textUpdated.then(function () { return parent.emitFile({ filePath: event.filePath }); }) .then(function (res) { return mainPanelView_1.errorView.showEmittedMessage(res); }); }); diff --git a/lib/main/atom/onSaveHandler.ts b/lib/main/atom/onSaveHandler.ts index 0ed88d33e..186776cfc 100644 --- a/lib/main/atom/onSaveHandler.ts +++ b/lib/main/atom/onSaveHandler.ts @@ -32,6 +32,7 @@ export function handle(event: { filePath: string; editor: AtomCore.IEditor }) { // Compile on save parent.getProjectFileDetails({ filePath: event.filePath }).then(fileDetails => { if (!fileDetails.project.compileOnSave) return; + if (!fileDetails.project.compilerOptions.out) return; textUpdated.then(() => parent.emitFile({ filePath: event.filePath })) .then((res) => errorView.showEmittedMessage(res));