mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
Refactor CLI entry point (#2157)
Changes "deno --types" to "deno types" and "deno --prefetch" to "deno prefetch"
This commit is contained in:
parent
c08075053f
commit
cd19da62d9
12 changed files with 425 additions and 404 deletions
10
js/main.ts
10
js/main.ts
|
@ -15,9 +15,6 @@ import { setLocation } from "./location";
|
|||
// builtin modules
|
||||
import * as deno from "./deno";
|
||||
|
||||
// TODO(kitsonk) remove with `--types` below
|
||||
import libDts from "gen/cli/lib/lib.deno_runtime.d.ts!string";
|
||||
|
||||
export default function denoMain(name?: string): void {
|
||||
const startResMsg = os.start(name);
|
||||
|
||||
|
@ -31,13 +28,6 @@ export default function denoMain(name?: string): void {
|
|||
os.exit(0);
|
||||
}
|
||||
|
||||
// handle `--types`
|
||||
// TODO(kitsonk) move to Rust fetching from compiler
|
||||
if (startResMsg.typesFlag()) {
|
||||
console.log(libDts);
|
||||
os.exit(0);
|
||||
}
|
||||
|
||||
const mainModule = startResMsg.mainModule();
|
||||
if (mainModule) {
|
||||
assert(mainModule.length > 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue