Always evaluate an expression for JS

People were complaining too much
This commit is contained in:
1computer1 2019-05-22 13:28:38 -04:00
parent 7c5203bc1d
commit cf1589eb2f
3 changed files with 3 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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;
}
}