summaryrefslogtreecommitdiff
path: root/cli/lib.rs
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2019-11-14 02:35:56 +1100
committerRy Dahl <ry@tinyclouds.org>2019-11-13 10:35:56 -0500
commit8d03397293b388317299dfb0648b541a7005807d (patch)
tree38aeb4deb371e81f47b6750110d96de46b9f5b05 /cli/lib.rs
parentee1b8dc883db1531d913f7b10a8d1160f3209d93 (diff)
Make bundles fully standalone (#3325)
- Bundles are fully standalone. They now include the shared loader with `deno_typescript`. - Refactor of the loader in `deno_typescript` to perform module instantiation in a more - Change of behaviour when an output file is not specified on the CLI. Previously a default name was determined and the bundle written to that file, now the bundle will be sent to `stdout`. - Refactors in the TypeScript compiler to be able to support the concept of a request type. This provides a cleaner abstraction and makes it easier to support things like single module transpiles to the userland. - Remove a "dangerous" circular dependency between `os.ts` and `deno.ts`, and define `pid` and `noColor` in a better way. - Don't bind early to `console` in `repl.ts`. - Add an integration test for generating a bundle.
Diffstat (limited to 'cli/lib.rs')
-rw-r--r--cli/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/lib.rs b/cli/lib.rs
index 637986f9f..17ca94b55 100644
--- a/cli/lib.rs
+++ b/cli/lib.rs
@@ -325,8 +325,11 @@ fn bundle_command(flags: DenoFlags, argv: Vec<String>) {
let (worker, state) = create_worker_and_state(flags, argv);
let main_module = state.main_module.as_ref().unwrap().clone();
- assert!(state.argv.len() >= 3);
- let out_file = state.argv[2].clone();
+ assert!(state.argv.len() >= 2);
+ let out_file = match state.argv.len() {
+ 3 => Some(state.argv[2].clone()),
+ _ => None,
+ };
debug!(">>>>> bundle_async START");
// NOTE: we need to poll `worker` otherwise TS compiler worker won't run properly
let main_future = lazy(move || {