diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-07-12 22:34:06 -0400 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-08-30 21:28:29 -0400 |
commit | 4d09c1a7930c80f8edce2bf825a09a11e1ee1cc3 (patch) | |
tree | 04eecdd665fd7bd2d4178dc3406cfaff9fd3258f /src | |
parent | 4c3efd2a9a134a15c19ffd232d2e1314b5a64866 (diff) |
Make the compiler output executable scripts if node is being used
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler.js b/src/compiler.js index 89da32d5..a3e9479f 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -48,6 +48,9 @@ if (ENVIRONMENT_IS_NODE) { arguments_ = process['argv'].slice(2); + // Print the shbang line + print('#!/usr/bin/env node'); + } else if (ENVIRONMENT_IS_SHELL) { // Polyfill over SpiderMonkey/V8 differences if (!this['read']) { |