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) {
 | 
					function createSandboxBundle(defines, code) {
 | 
				
			||||||
  var sandboxAMDName = "pdfjs-dist/build/pdf.sandbox";
 | 
					  var sandboxAMDName = "pdfjs-dist/build/pdf.sandbox";
 | 
				
			||||||
  var sandboxOutputName = "pdf.sandbox.js";
 | 
					  var sandboxOutputName = "pdf.sandbox.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  var sandboxFileConfig = createWebpackConfig(defines, {
 | 
					  var sandboxFileConfig = createWebpackConfig(defines, {
 | 
				
			||||||
    filename: sandboxOutputName,
 | 
					    filename: sandboxOutputName,
 | 
				
			||||||
    library: sandboxAMDName,
 | 
					    library: sandboxAMDName,
 | 
				
			||||||
@ -372,7 +373,7 @@ function createSandboxBundle(defines, code) {
 | 
				
			|||||||
  });
 | 
					  });
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    gulp
 | 
					    gulp
 | 
				
			||||||
      .src("./src/scripting_api/quickjs-sandbox.js")
 | 
					      .src("./src/pdf.sandbox.js")
 | 
				
			||||||
      .pipe(webpack2Stream(sandboxFileConfig))
 | 
					      .pipe(webpack2Stream(sandboxFileConfig))
 | 
				
			||||||
      .pipe(replaceWebpackRequire())
 | 
					      .pipe(replaceWebpackRequire())
 | 
				
			||||||
      .pipe(replaceJSRootName(sandboxAMDName, "pdfjsSandbox"))
 | 
					      .pipe(replaceJSRootName(sandboxAMDName, "pdfjsSandbox"))
 | 
				
			||||||
 | 
				
			|||||||
@ -13,7 +13,12 @@
 | 
				
			|||||||
 * limitations under the License.
 | 
					 * 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 {
 | 
					class Sandbox {
 | 
				
			||||||
  constructor(module, testMode) {
 | 
					  constructor(module, testMode) {
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user