mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Re-implement working dev-sandbox
/watch-dev-sandbox
gulp-tasks
Compared to the, previously removed, `sandbox`/`watch-sandbox` gulp-tasks, these ones should work even when run against an non-existent/empty `build`-folder. Also, to ensure that the development viewer actually works out-of-the-box, `gulp server` will now also include `gulp watch-dev-sandbox` to remove the need to *manually* invoke the build-tasks. Finally, this patch also removes the `web/devcom.js` file since it shouldn't actually be needed, assuming that the "sandbox"-loading code in the `web/genericcom.js` file is actually *correctly* implemented.
This commit is contained in:
parent
13d7244529
commit
c39f1aedb2
5 changed files with 67 additions and 65 deletions
|
@ -223,14 +223,6 @@ const defaultOptions = {
|
|||
value: false,
|
||||
kind: OptionKind.API,
|
||||
},
|
||||
scriptingSrc: {
|
||||
/** @type {string} */
|
||||
value:
|
||||
typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")
|
||||
? "../build/generic/build/pdf.sandbox.js"
|
||||
: "../build/pdf.sandbox.js",
|
||||
kind: OptionKind.VIEWER,
|
||||
},
|
||||
verbosity: {
|
||||
/** @type {number} */
|
||||
value: 1,
|
||||
|
@ -265,6 +257,14 @@ if (
|
|||
value: typeof navigator !== "undefined" ? navigator.language : "en-US",
|
||||
kind: OptionKind.VIEWER,
|
||||
};
|
||||
defaultOptions.sandboxBundleSrc = {
|
||||
/** @type {string} */
|
||||
value:
|
||||
typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")
|
||||
? "../build/dev-sandbox/pdf.sandbox.js"
|
||||
: "../build/pdf.sandbox.js",
|
||||
kind: OptionKind.VIEWER,
|
||||
};
|
||||
}
|
||||
|
||||
const userOptions = Object.create(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue