diff --git a/gulpfile.js b/gulpfile.js index 8e95a5257..b1bf1e5d3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -349,6 +349,7 @@ function createScriptingBundle(defines) { function createSandboxBundle(defines, code) { var sandboxAMDName = "pdfjs-dist/build/pdf.sandbox"; var sandboxOutputName = "pdf.sandbox.js"; + var sandboxFileConfig = createWebpackConfig(defines, { filename: sandboxOutputName, library: sandboxAMDName, @@ -372,7 +373,7 @@ function createSandboxBundle(defines, code) { }); return ( gulp - .src("./src/scripting_api/quickjs-sandbox.js") + .src("./src/pdf.sandbox.js") .pipe(webpack2Stream(sandboxFileConfig)) .pipe(replaceWebpackRequire()) .pipe(replaceJSRootName(sandboxAMDName, "pdfjsSandbox")) diff --git a/src/scripting_api/quickjs-sandbox.js b/src/pdf.sandbox.js similarity index 91% rename from src/scripting_api/quickjs-sandbox.js rename to src/pdf.sandbox.js index cbf6e4e87..8bb6b37b8 100644 --- a/src/scripting_api/quickjs-sandbox.js +++ b/src/pdf.sandbox.js @@ -13,7 +13,12 @@ * limitations under the License. */ -import ModuleLoader from "../../external/quickjs/quickjs-eval.js"; +import ModuleLoader from "../external/quickjs/quickjs-eval.js"; + +/* eslint-disable-next-line no-unused-vars */ +const pdfjsVersion = PDFJSDev.eval("BUNDLE_VERSION"); +/* eslint-disable-next-line no-unused-vars */ +const pdfjsBuild = PDFJSDev.eval("BUNDLE_BUILD"); class Sandbox { constructor(module, testMode) {