Skip to content

Commit 2d4a989

Browse files
committed
Fix the gulp types task to run on Windows, and place the TypeScript definitions correctly in pdfjs-dist
- Fix the `gulp types` task to run on Windows. Currently this fails, and the solution was to "borrow" the same formatting as used in the `gulp jsdoc` task. - Place the TypeScript definitions in their own `types` directory, when building `pdfjs-dist`. These should *not* be cluttering the main `build` directory, especially since the generated TypeScript definitions consists of *multiple folders*. (Only if the TypeScript definitions would be concatenated into *a single file*, would placing them directly in `pdfjs-dist/build` be acceptable.)
1 parent e68ac05 commit 2d4a989

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ gulp.task("types", function (done) {
11541154
"forceConsistentCasingInFileNames",
11551155
"emitDeclarationOnly",
11561156
].join(" --");
1157-
exec(`node_modules/.bin/tsc --${args} src/pdf.js`, done);
1157+
exec(`"node_modules/.bin/tsc" --${args} src/pdf.js`, done);
11581158
});
11591159

11601160
function buildLib(defines, dir) {
@@ -1753,8 +1753,8 @@ gulp.task(
17531753
.src(LIB_DIR + "**/*", { base: LIB_DIR })
17541754
.pipe(gulp.dest(DIST_DIR + "lib/")),
17551755
gulp
1756-
.src(TYPES_BUILD_DIR + "**/**")
1757-
.pipe(gulp.dest(DIST_DIR + "build/")),
1756+
.src(TYPES_BUILD_DIR + "**/*", { base: TYPES_BUILD_DIR })
1757+
.pipe(gulp.dest(DIST_DIR + "types/")),
17581758
]);
17591759
}
17601760
)

0 commit comments

Comments
 (0)