aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 9621bb8e..d7143dde 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -774,10 +774,9 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
var shellFile = BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js';
var shellParts = read(shellFile).split('{{BODY}}');
print(shellParts[0]);
- if (!BUILD_AS_SHARED_LIB) {
- var pre = processMacros(preprocess(read('preamble.js').replace('{{RUNTIME}}', getRuntime()), CONSTANTS));
- print(pre);
- }
+ var preFile = BUILD_AS_SHARED_LIB ? 'preamble_sharedlib.js' : 'preamble.js';
+ var pre = processMacros(preprocess(read(preFile).replace('{{RUNTIME}}', getRuntime()), CONSTANTS));
+ print(pre);
generated.forEach(function(item) { print(indentify(item.JS || '', 2)); });
print(Functions.generateIndexing());