Always evaluate an expression for JS
People were complaining too much
This commit is contained in:
parent
7c5203bc1d
commit
cf1589eb2f
3 changed files with 3 additions and 15 deletions
|
@ -79,7 +79,6 @@ Options are optionally set in `options`, which is a semicolon-delimited list of
|
|||
- `java` Java (OpenJDK)
|
||||
- `js` JavaScript (Node)
|
||||
- `harmony` enables harmony features (`--harmony` on node)
|
||||
- `e` prints the result of evaluating the code
|
||||
- `julia` Julia
|
||||
- `e` prints the result of evaluating the code
|
||||
- `lisp` Racket
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
if [ "$EVAL_EXPR" = "true" ]; then
|
||||
flag="-p"
|
||||
else
|
||||
flag="-e"
|
||||
fi
|
||||
|
||||
if [ "$EVAL_HARMONY" = "true" ]; then
|
||||
node --harmony "$flag" "$1"
|
||||
node --harmony -p "$1"
|
||||
else
|
||||
node "$flag" "$1"
|
||||
node -p "$1"
|
||||
fi
|
||||
|
|
|
@ -6,8 +6,7 @@ class JavaScript extends Language {
|
|||
name: 'JavaScript',
|
||||
aliases: ['javascript', 'js'],
|
||||
options: {
|
||||
harmony: () => '',
|
||||
e: () => ''
|
||||
harmony: () => ''
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -18,10 +17,6 @@ class JavaScript extends Language {
|
|||
ret.env.EVAL_HARMONY = 'true';
|
||||
}
|
||||
|
||||
if (options.has('e')) {
|
||||
ret.env.EVAL_EXPR = 'true';
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue