-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Fix the gulp types
task to run on Windows, and place the TypeScript definitions correctly in pdfjs-dist
#12168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
You should change the diff --git a/gulpfile.js b/gulpfile.js
index 7da61ed1..6f3d480a 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1640,7 +1640,7 @@ function packageBowerJson() {
name: DIST_NAME,
version: VERSION,
main: "build/pdf.js",
- types: "build/pdf.d.ts",
+ types: "types/pdf.d.ts",
description: DIST_DESCRIPTION,
keywords: DIST_KEYWORDS,
homepage: DIST_HOMEPAGE, See https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html |
2d4a989
to
930e4e6
Compare
The following fixes diff --git a/gulpfile.js b/gulpfile.js
index e44d6e04..51b9921f 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1374,7 +1374,7 @@ gulp.task(
.pipe(gulp.dest(TYPESTEST_DIR + "build/")),
gulp
.src(TYPES_BUILD_DIR + "**/**")
- .pipe(gulp.dest(TYPESTEST_DIR + "build/")),
+ .pipe(gulp.dest(TYPESTEST_DIR + "types/")),
]);
},
function (done) { I think |
930e4e6
to
3965430
Compare
… 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.)
3965430
to
fb85c2d
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/578d0e53c9437a2/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/578d0e53c9437a2/output.txt Total script time: 3.49 mins Published |
Tested locally as well and this seems to work just fine. Thanks! |
Fix the
gulp types
task to run on Windows. Currently this fails, and the solution was to "borrow" the same formatting as used in thegulp jsdoc
task.Place the TypeScript definitions in their own
types
directory, when buildingpdfjs-dist
. These should not be cluttering the mainbuild
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 inpdfjs-dist/build
be acceptable.)