diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-25 16:57:02 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-25 16:57:02 -0700 |
commit | 8c057a9a985165e203c95401de7e137ac0ec5083 (patch) | |
tree | e949d5ed3aa8251283f9d8bdd7092117d94cbfe6 | |
parent | 56c19a74e44458003c2470e08055e7fae23fc1c0 (diff) | |
parent | 20d6af799df7143ba1c269aa4dde1ac5c4b53b70 (diff) |
Merge pull request #588 from imvu/shell-file-pull-request
Add the ability to specify a custom shell file.
-rw-r--r-- | src/jsifier.js | 2 | ||||
-rw-r--r-- | src/settings.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 01ecd7d3..92b39b7d 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -32,7 +32,7 @@ function JSify(data, functionsOnly, givenFunctions) { // else. This lets us not hold any strings in memory, we simply print // things out as they are ready. - var shellFile = BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js'; + var shellFile = SHELL_FILE ? SHELL_FILE : (BUILD_AS_SHARED_LIB ? 'shell_sharedlib.js' : 'shell.js'); var shellParts = read(shellFile).split('{{BODY}}'); print(shellParts[0]); var preFile = BUILD_AS_SHARED_LIB ? 'preamble_sharedlib.js' : 'preamble.js'; diff --git a/src/settings.js b/src/settings.js index 76dc25a1..16cc3930 100644 --- a/src/settings.js +++ b/src/settings.js @@ -198,6 +198,8 @@ var INCLUDE_FULL_LIBRARY = 0; // Whether to include the whole library rather tha // dynamically loading modules that make use of runtime // library functions that are not used in the main module. +var SHELL_FILE = null; // set this to a string to override the shell file used + var SHOW_LABELS = 0; // Show labels in the generated code var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library, which |