Skip to content

Commit 255003b

Browse files
committed
Merge pull request #572 from stepancar/feature
refs #531 noEmit fix in atom-typescript. do not emit files if noEmit …
2 parents 61a889c + 971f1cb commit 255003b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/main/lang/modules/building.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function emitFile(proj, filePath) {
3838
output.outputFiles.forEach(function (o) {
3939
mkdirp.sync(path.dirname(o.name));
4040
var additionalEmits = runExternalTranspiler(filePath, sourceFile.text, o, proj, sourceMapContents);
41-
if (!sourceMapContents[o.name]) {
41+
if (!sourceMapContents[o.name] && !proj.projectFile.project.compilerOptions.noEmit) {
4242
fs.writeFileSync(o.name, o.text, "utf8");
4343
}
4444
additionalEmits.forEach(function (a) {

lib/main/lang/modules/building.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function emitFile(proj: project.Project, filePath: string): EmitOutput {
6262
sourceMapContents
6363
);
6464

65-
if (!sourceMapContents[o.name]) {
65+
if (!sourceMapContents[o.name] && !proj.projectFile.project.compilerOptions.noEmit) {
6666
// .js.map files will be written as an "additional emit" later.
6767
fs.writeFileSync(o.name, o.text, "utf8");
6868
}
@@ -74,7 +74,7 @@ export function emitFile(proj: project.Project, filePath: string): EmitOutput {
7474
});
7575
}
7676

77-
// There is no *official* emit output for a `d.ts`
77+
// There is no *official* emit output for a `d.ts`
7878
// but its nice to have a consistent world view in the rest of our code
7979
var outputFiles = output.outputFiles.map((o) => o.name);
8080
if (path.extname(filePath) == '.d.ts') {
@@ -264,4 +264,4 @@ export function emitDts(proj: project.Project) {
264264

265265
outDir: proj.projectFile.project.compilerOptions.outDir
266266
})
267-
}
267+
}

0 commit comments

Comments
 (0)