diff options
author | ztplz <mysticzt@gmail.com> | 2018-09-22 20:47:44 +0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-22 08:47:44 -0400 |
commit | f3684c28e54604dd883e41ecf6b9d922c14a838b (patch) | |
tree | 6cce9c6e2f0a08e05e1f64ac820c6a69e87a6149 /js | |
parent | 7a4ad045b1f5d80d7785916a2209caaf6f552a4b (diff) |
Rename deno.argv, libdeno::DenoC and deno_set_flags (#796)
Diffstat (limited to 'js')
-rw-r--r-- | js/deno.ts | 2 | ||||
-rw-r--r-- | js/main.ts | 12 | ||||
-rw-r--r-- | js/test_util.ts | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/js/deno.ts b/js/deno.ts index b14bcc561..dd6539163 100644 --- a/js/deno.ts +++ b/js/deno.ts @@ -14,4 +14,4 @@ export { ErrorKind, DenoError } from "./errors"; export { libdeno } from "./libdeno"; export { arch, platform } from "./platform"; export { trace } from "./trace"; -export const argv: string[] = []; +export const args: string[] = []; diff --git a/js/main.ts b/js/main.ts index f9cd6d140..e927710a7 100644 --- a/js/main.ts +++ b/js/main.ts @@ -5,7 +5,7 @@ import { assert, log, setLogDebug } from "./util"; import * as os from "./os"; import { DenoCompiler } from "./compiler"; import { libdeno } from "./libdeno"; -import { argv } from "./deno"; +import { args } from "./deno"; import { sendSync, handleAsyncMsgFromRust } from "./dispatch"; function sendStart(): fbs.StartRes { @@ -39,7 +39,7 @@ export default function denoMain() { // First we send an empty "Start" message to let the privlaged side know we // are ready. The response should be a "StartRes" message containing the CLI - // argv and other info. + // args and other info. const startResMsg = sendStart(); setLogDebug(startResMsg.debugFlag()); @@ -49,12 +49,12 @@ export default function denoMain() { // TODO handle shebang. for (let i = 1; i < startResMsg.argvLength(); i++) { - argv.push(startResMsg.argv(i)); + args.push(startResMsg.argv(i)); } - log("argv", argv); - Object.freeze(argv); + log("args", args); + Object.freeze(args); - const inputFn = argv[0]; + const inputFn = args[0]; if (!inputFn) { console.log("No input script specified."); os.exit(1); diff --git a/js/test_util.ts b/js/test_util.ts index b7210b43c..34a920d47 100644 --- a/js/test_util.ts +++ b/js/test_util.ts @@ -12,7 +12,7 @@ import * as testing from "./testing/testing.ts"; export { assert, assertEqual } from "./testing/testing.ts"; // testing.setFilter must be run before any tests are defined. -testing.setFilter(deno.argv[1]); +testing.setFilter(deno.args[1]); interface DenoPermissions { write?: boolean; |