Fix singlefile build target

This commit is contained in:
Gregory Jordan 2013-12-28 22:33:29 -05:00
parent 1de3fae840
commit 04e2235ce7

View File

@ -317,6 +317,10 @@ target.bundle = function(args) {
// We want shared_src_files in both pdf.js and pdf.worker.js // We want shared_src_files in both pdf.js and pdf.worker.js
// unless it's being built in singlefile mode. // unless it's being built in singlefile mode.
WORKER_SRC_FILES = SHARED_SRC_FILES.concat(WORKER_SRC_FILES); WORKER_SRC_FILES = SHARED_SRC_FILES.concat(WORKER_SRC_FILES);
} else {
// In singlefile mode, all of the src files will be bundled into
// the main pdf.js outuput.
MAIN_SRC_FILES = MAIN_SRC_FILES.concat(WORKER_SRC_FILES);
} }
var EXT_SRC_FILES = [ var EXT_SRC_FILES = [
@ -367,9 +371,8 @@ target.singlefile = function() {
cd(SINGLE_FILE_DIR); cd(SINGLE_FILE_DIR);
echo(); echo();
echo('### Concatenating pdf.js and pdf.worker.js into pdf.combined.js'); echo('### Moving pdf.js to pdf.combined.js');
var pdfJs = cat(BUILD_TARGET); var pdfJs = cat(BUILD_TARGET);
pdfJs += cat(BUILD_WORKER_TARGET);
pdfJs.to(SINGLE_FILE_TARGET); pdfJs.to(SINGLE_FILE_TARGET);
rm(BUILD_TARGET); rm(BUILD_TARGET);