1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Introduces UMD headers to the web/ folder.

This commit is contained in:
Yury Delendik 2016-04-08 12:34:27 -05:00
parent 1c253e6e1d
commit 006e8fb59d
39 changed files with 836 additions and 281 deletions

View file

@ -66,7 +66,14 @@ function preprocess(inFilename, outFilename, defines) {
var realPath = fs.realpathSync(inFilename);
var dir = path.dirname(realPath);
try {
preprocess(path.join(dir, file), writeLine, defines);
var fullpath;
if (file.indexOf('$ROOT/') === 0) {
fullpath = path.join(__dirname, '../..',
file.substring('$ROOT/'.length));
} else {
fullpath = path.join(dir, file);
}
preprocess(fullpath, writeLine, defines);
} catch (e) {
if (e.code === 'ENOENT') {
throw new Error('Failed to include "' + file + '" at ' + loc());