diff --git a/BUILD.gn b/BUILD.gn index 8b526bc2eb..41a84613e5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -154,7 +154,7 @@ deno_cargo_info = exec_script("build_extra/rust/get_cargo_info.py", "json") rust_executable("deno") { - source_root = "src/main.rs" + source_root = "cli/main.rs" extern = main_extern deps = [ ":deno_deps", @@ -170,7 +170,7 @@ rust_executable("deno") { } rust_test("test_rs") { - source_root = "src/main.rs" + source_root = "cli/main.rs" extern = main_extern deps = [ ":deno_deps", @@ -257,13 +257,13 @@ bundle("compiler_bundle") { ts_flatbuffer("msg_ts") { sources = [ - "src/msg.fbs", + "cli/msg.fbs", ] } rust_flatbuffer("msg_rs") { sources = [ - "src/msg.fbs", + "cli/msg.fbs", ] } diff --git a/Cargo.toml b/Cargo.toml index b603ac593c..5864d268cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,10 @@ members = [ "core", ] +[[bin]] +name = "deno" +path = "cli/main.rs" + [package] name = "deno" version = "0.3.3" diff --git a/src/ansi.rs b/cli/ansi.rs similarity index 100% rename from src/ansi.rs rename to cli/ansi.rs diff --git a/src/cli.rs b/cli/cli.rs similarity index 100% rename from src/cli.rs rename to cli/cli.rs diff --git a/src/compiler.rs b/cli/compiler.rs similarity index 100% rename from src/compiler.rs rename to cli/compiler.rs diff --git a/src/deno_dir.rs b/cli/deno_dir.rs similarity index 100% rename from src/deno_dir.rs rename to cli/deno_dir.rs diff --git a/src/errors.rs b/cli/errors.rs similarity index 100% rename from src/errors.rs rename to cli/errors.rs diff --git a/src/flags.rs b/cli/flags.rs similarity index 100% rename from src/flags.rs rename to cli/flags.rs diff --git a/src/fs.rs b/cli/fs.rs similarity index 100% rename from src/fs.rs rename to cli/fs.rs diff --git a/src/global_timer.rs b/cli/global_timer.rs similarity index 100% rename from src/global_timer.rs rename to cli/global_timer.rs diff --git a/src/http_body.rs b/cli/http_body.rs similarity index 100% rename from src/http_body.rs rename to cli/http_body.rs diff --git a/src/http_util.rs b/cli/http_util.rs similarity index 100% rename from src/http_util.rs rename to cli/http_util.rs diff --git a/src/isolate.rs b/cli/isolate.rs similarity index 100% rename from src/isolate.rs rename to cli/isolate.rs diff --git a/src/isolate_state.rs b/cli/isolate_state.rs similarity index 100% rename from src/isolate_state.rs rename to cli/isolate_state.rs diff --git a/src/js_errors.rs b/cli/js_errors.rs similarity index 100% rename from src/js_errors.rs rename to cli/js_errors.rs diff --git a/src/main.rs b/cli/main.rs similarity index 100% rename from src/main.rs rename to cli/main.rs diff --git a/src/modules.rs b/cli/modules.rs similarity index 100% rename from src/modules.rs rename to cli/modules.rs diff --git a/src/msg.fbs b/cli/msg.fbs similarity index 100% rename from src/msg.fbs rename to cli/msg.fbs diff --git a/src/msg.rs b/cli/msg.rs similarity index 100% rename from src/msg.rs rename to cli/msg.rs diff --git a/src/msg_util.rs b/cli/msg_util.rs similarity index 100% rename from src/msg_util.rs rename to cli/msg_util.rs diff --git a/src/ops.rs b/cli/ops.rs similarity index 100% rename from src/ops.rs rename to cli/ops.rs diff --git a/src/permissions.rs b/cli/permissions.rs similarity index 100% rename from src/permissions.rs rename to cli/permissions.rs diff --git a/src/repl.rs b/cli/repl.rs similarity index 100% rename from src/repl.rs rename to cli/repl.rs diff --git a/src/resolve_addr.rs b/cli/resolve_addr.rs similarity index 100% rename from src/resolve_addr.rs rename to cli/resolve_addr.rs diff --git a/src/resources.rs b/cli/resources.rs similarity index 100% rename from src/resources.rs rename to cli/resources.rs diff --git a/src/startup_data.rs b/cli/startup_data.rs similarity index 100% rename from src/startup_data.rs rename to cli/startup_data.rs diff --git a/src/tokio_util.rs b/cli/tokio_util.rs similarity index 100% rename from src/tokio_util.rs rename to cli/tokio_util.rs diff --git a/src/tokio_write.rs b/cli/tokio_write.rs similarity index 100% rename from src/tokio_write.rs rename to cli/tokio_write.rs diff --git a/src/version.rs b/cli/version.rs similarity index 100% rename from src/version.rs rename to cli/version.rs diff --git a/src/workers.rs b/cli/workers.rs similarity index 100% rename from src/workers.rs rename to cli/workers.rs diff --git a/js/stat_test.ts b/js/stat_test.ts index 3a109c0b5e..ae6477d790 100644 --- a/js/stat_test.ts +++ b/js/stat_test.ts @@ -12,9 +12,9 @@ testPerm({ read: true }, async function statSyncSuccess() { assert(testingInfo.isDirectory()); assert(!testingInfo.isSymlink()); - const srcInfo = Deno.statSync("src"); - assert(srcInfo.isDirectory()); - assert(!srcInfo.isSymlink()); + const testsInfo = Deno.statSync("tests"); + assert(testsInfo.isDirectory()); + assert(!testsInfo.isSymlink()); }); testPerm({ read: false }, async function statSyncPerm() { @@ -54,9 +54,9 @@ testPerm({ read: true }, async function lstatSyncSuccess() { assert(!testingInfo.isDirectory()); assert(testingInfo.isSymlink()); - const srcInfo = Deno.lstatSync("src"); - assert(srcInfo.isDirectory()); - assert(!srcInfo.isSymlink()); + const testsInfo = Deno.lstatSync("tests"); + assert(testsInfo.isDirectory()); + assert(!testsInfo.isSymlink()); }); testPerm({ read: false }, async function lstatSyncPerm() { @@ -96,9 +96,9 @@ testPerm({ read: true }, async function statSuccess() { assert(testingInfo.isDirectory()); assert(!testingInfo.isSymlink()); - const srcInfo = await Deno.stat("src"); - assert(srcInfo.isDirectory()); - assert(!srcInfo.isSymlink()); + const testsInfo = await Deno.stat("tests"); + assert(testsInfo.isDirectory()); + assert(!testsInfo.isSymlink()); }); testPerm({ read: false }, async function statPerm() { @@ -138,9 +138,9 @@ testPerm({ read: true }, async function lstatSuccess() { assert(!testingInfo.isDirectory()); assert(testingInfo.isSymlink()); - const srcInfo = await Deno.lstat("src"); - assert(srcInfo.isDirectory()); - assert(!srcInfo.isSymlink()); + const testsInfo = await Deno.lstat("tests"); + assert(testsInfo.isDirectory()); + assert(!testsInfo.isSymlink()); }); testPerm({ read: false }, async function lstatPerm() { diff --git a/tools/format.py b/tools/format.py index 74323708a0..bc6a3b532e 100755 --- a/tools/format.py +++ b/tools/format.py @@ -45,4 +45,4 @@ print "rustfmt" qrun([ "third_party/rustfmt/" + platform() + "/rustfmt", "--config-path", rustfmt_config, "build.rs" -] + find_exts(["src", "core"], [".rs"])) +] + find_exts(["cli", "core"], [".rs"]))