Skip to content

Commit b580cd3

Browse files
committed
Update release
1 parent 6a92fcb commit b580cd3

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

release/compiler.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ var ProjectCompiler = (function () {
105105
baseDeclarations = path.join(this.project.options.declarationDir, baseRelative);
106106
}
107107
}
108+
else if (this.project.options.outFile) {
109+
base = this.project.directory;
110+
}
108111
else {
109-
var outFile = this.project.options.outFile || this.project.options.out;
112+
var outFile = this.project.options.out;
110113
base = jsFileName.substring(0, jsFileName.length - outFile.length);
111114
}
112115
if (jsContent !== undefined) {

release/output.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ var Output = (function () {
5858
// since `generator.applySourceMap` has a really bad performance on big inputs.
5959
if (inputMap.mappings !== '') {
6060
var consumer = new sourceMap.SourceMapConsumer(inputMap);
61-
generator.applySourceMap(consumer, sourceFile.fileNameOriginal, sourceFile.gulp.base);
61+
generator.applySourceMap(consumer);
6262
}
6363
if (!inputMap.sources || !inputMap.sourcesContent)
6464
continue;
6565
for (var i = 0; i < inputMap.sources.length; i++) {
6666
var absolute = path.resolve(sourceFile.gulp.base, inputMap.sources[i]);
6767
var relative = path.relative(output.base, absolute);
68-
generator.setSourceContent(relative, inputMap.sourcesContent[i]);
68+
generator.setSourceContent(utils.forwardSlashes(relative), inputMap.sourcesContent[i]);
6969
}
7070
}
7171
return generator.toString();

release/project.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface ProjectInfo {
2121
singleOutput: boolean;
2222
options: ts.CompilerOptions;
2323
typescript: typeof ts;
24+
directory: string;
2425
reporter: Reporter;
2526
}
2627
export declare function setupProject(projectDirectory: string, config: TsConfig, options: ts.CompilerOptions, typescript: typeof ts): Project;

release/project.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ function setupProject(projectDirectory, config, options, typescript) {
5050
compiler: compiler,
5151
options: options,
5252
typescript: typescript,
53+
directory: projectDirectory,
5354
// Set when `project` is called
5455
output: undefined,
5556
reporter: undefined

0 commit comments

Comments
 (0)