Move, and rename, the src/scripting_api/quickjs-sandbox.js
file to src/pdf.sandbox.js
The current location feels somewhat strange, and also inconsistent with the existing way that bundling is done. Finally, add the version/build numbers at the top of the *built* `pdf.sandbox.js` files, since all other built files include that information given that it's often helpful to be able to easily determine the *exact* version.
This commit is contained in:
parent
54ca67d628
commit
715b8aa389
@ -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"))
|
||||
|
@ -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) {
|
Loading…
x
Reference in New Issue
Block a user