|
15 | 15 | // specific language governing permissions and limitations |
16 | 16 | // under the License. |
17 | 17 |
|
18 | | -import { targetDir, tsconfigName, observableFromStreams, shouldRunInChildProcess, spawnGulpCommandInChildProcess } from "./util.js"; |
| 18 | +import { targetDir, tsconfigName, observableFromStreams, shouldRunInChildProcess, spawnGulpCommandInChildProcess } from './util.js'; |
19 | 19 |
|
20 | | -import gulp from "gulp"; |
21 | | -import path from "path"; |
22 | | -import ts from "gulp-typescript"; |
23 | | -import tsc from "typescript"; |
24 | | -import sourcemaps from "gulp-sourcemaps"; |
25 | | -import { memoizeTask } from "./memoize-task.js"; |
26 | | -import { ReplaySubject, forkJoin as ObservableForkJoin } from "rxjs"; |
27 | | -import { mergeWith, takeLast, share } from "rxjs/operators"; |
| 20 | +import gulp from 'gulp'; |
| 21 | +import path from 'path'; |
| 22 | +import ts from 'gulp-typescript'; |
| 23 | +import tsc from 'typescript'; |
| 24 | +import sourcemaps from 'gulp-sourcemaps'; |
| 25 | +import { memoizeTask } from './memoize-task.js'; |
| 26 | +import { ReplaySubject, forkJoin as ObservableForkJoin } from 'rxjs'; |
| 27 | +import { mergeWith, takeLast, share } from 'rxjs/operators'; |
28 | 28 |
|
29 | 29 | export const typescriptTask = ((cache) => memoizeTask(cache, function typescript(target, format) { |
30 | 30 | if (shouldRunInChildProcess(target, format)) { |
@@ -54,9 +54,9 @@ function compileTypescript(out, tsconfigPath, tsconfigOverrides) { |
54 | 54 | tsProject(ts.reporter.defaultReporter()) |
55 | 55 | ); |
56 | 56 | const writeSources = observableFromStreams(tsProject.src(), gulp.dest(path.join(out, 'src'))); |
57 | | - const writeDTypes = observableFromStreams(dts, sourcemaps.write('./', { includeContent: false, sourceRoot: 'src' }), gulp.dest(out)); |
| 57 | + const writeDTypes = observableFromStreams(dts, sourcemaps.write('./', { includeContent: false, sourceRoot: './src' }), gulp.dest(out)); |
58 | 58 | const mapFile = tsProject.options.module === tsc.ModuleKind.ES2015 ? esmMapFile : cjsMapFile; |
59 | | - const writeJS = observableFromStreams(js, sourcemaps.write('./', { mapFile, includeContent: false, sourceRoot: 'src' }), gulp.dest(out)); |
| 59 | + const writeJS = observableFromStreams(js, sourcemaps.write('./', { mapFile, includeContent: false, sourceRoot: './src' }), gulp.dest(out)); |
60 | 60 | return ObservableForkJoin([writeSources, writeDTypes, writeJS]); |
61 | 61 | } |
62 | 62 |
|
|
0 commit comments