Skip to content

Commit 1718740

Browse files
Snuffleupaguspull[bot]
authored andcommitted
[api-minor] Stop including the "lib"-build in the pdfjs-dist repository
The `pdfjs-dist/lib/` directory contains a README file that explicitly advises against using those files, however based on a fairly large number of issues filed over the years users seem to be (mostly) overlooking that warning. In particular it unfortunately seems to be somewhat common for users to attempt to "combine" proper builds from `pdfjs-dist/build/` together with individual components from the `pdfjs-dist/lib/web/` directory, which more often than not leads to subtle bugs and general problems. When we receive bug reports about this it's often not immediately obvious what the problem is, given that many issues lack enough details (such as runnable test-cases), but after some back-and-forth it usually turns out that usage of `pdfjs-dist/lib/` is the culprit. Considering that keeping the general PDF.js library working is challenging and time-consuming enough nowadays, this patch thus proposes that we stop including the "lib"-build in the `pdfjs-dist` repository to both reduce user confusion and the support burden.
1 parent d174891 commit 1718740

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

external/dist/lib/README.md

-7
This file was deleted.

gulpfile.js

-5
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ const MINIFIED_LEGACY_DIR = BUILD_DIR + "minified-legacy/";
5858
const JSDOC_BUILD_DIR = BUILD_DIR + "jsdoc/";
5959
const GH_PAGES_DIR = BUILD_DIR + "gh-pages/";
6060
const SRC_DIR = "src/";
61-
const LIB_DIR = BUILD_DIR + "lib/";
6261
const DIST_DIR = BUILD_DIR + "dist/";
6362
const TYPES_DIR = BUILD_DIR + "types/";
6463
const TMP_DIR = BUILD_DIR + "tmp/";
@@ -2233,7 +2232,6 @@ gulp.task(
22332232
"components-legacy",
22342233
"image_decoders",
22352234
"image_decoders-legacy",
2236-
"lib",
22372235
"minified",
22382236
"minified-legacy",
22392237
"types",
@@ -2323,9 +2321,6 @@ gulp.task(
23232321
base: IMAGE_DECODERS_LEGACY_DIR,
23242322
})
23252323
.pipe(gulp.dest(DIST_DIR + "legacy/image_decoders/")),
2326-
gulp
2327-
.src(LIB_DIR + "**/*", { base: LIB_DIR })
2328-
.pipe(gulp.dest(DIST_DIR + "lib/")),
23292324
gulp
23302325
.src(TYPES_DIR + "**/*", { base: TYPES_DIR })
23312326
.pipe(gulp.dest(DIST_DIR + "types/")),

0 commit comments

Comments
 (0)