Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 40 lines (35 sloc) 1.118 kb
6bc00b6 1.3 release candidate adds support for nodejs, python, and several ru…
thatcher authored
1 #!/bin/sh
2 # Usage: envjs <platorm> file.js [file2.js ...]
3 ###########################################################################
4 ENVJS_PLATFORM='node'
5
6 # first arguments ($1)
7 # may be a platform or is a file and the default platorm is used
8 if [ -n "$1" ]; then
9 if [ -n "$1" ]; then ENVJS_PLATFORM="$1"; shift; fi
10 fi
11
12 # Run envjs with the given platform
13 ###########################################################################
14 case "$ENVJS_PLATFORM" in
15
16 "node")
17 node envjs/node.js $@
18 ;;
19 "rhino")
7de01cc rhino must still run in optimized node (might as well get used to it)
thatcher authored
20 java -Xmx512M -jar rhino/js.jar -opt -1 envjs/rhino.js $@
6bc00b6 1.3 release candidate adds support for nodejs, python, and several ru…
thatcher authored
21 ;;
22 "rhino-debug")
23 java -cp rhino/js.jar org.mozilla.javascript.tools.debugger.Main envjs/rhino.js $@
24 ;;
25 "spyd")
26 python envjs/spydermonkey.py envjs/spydermonkey.js $@
27 ;;
28 "rubyracer")
29 ruby -rrubygems envjs/rubyracer.rb envjs/rubyracer.js $@
30 ;;
31 "johnson")
32 ruby -rrubygems envjs/johnson.rb envjs/johnson.js $@
33 ;;
34 *)
35 # platform default means $1 was actually a file
36 node envjs/node.js $ENVJS_PLATFORM $@
37 ;;
38 esac
39
Something went wrong with that request. Please try again.