mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 13:00:36 -05:00
Merge deno_cli_snapshots into deno_cli (#3064)
This commit is contained in:
parent
9049213867
commit
b81e5db17a
148 changed files with 38 additions and 83 deletions
|
@ -1,2 +1 @@
|
|||
/js/deps/
|
||||
cli/tests/error_syntax.js
|
||||
|
|
9
Cargo.lock
generated
9
Cargo.lock
generated
|
@ -272,7 +272,6 @@ dependencies = [
|
|||
"atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"deno 0.19.0",
|
||||
"deno_cli_snapshots 0.19.0",
|
||||
"deno_typescript 0.19.0",
|
||||
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -313,14 +312,6 @@ dependencies = [
|
|||
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deno_cli_snapshots"
|
||||
version = "0.19.0"
|
||||
dependencies = [
|
||||
"deno 0.19.0",
|
||||
"deno_typescript 0.19.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deno_typescript"
|
||||
version = "0.19.0"
|
||||
|
|
|
@ -4,5 +4,4 @@ members = [
|
|||
"core",
|
||||
"tools/hyper_hello",
|
||||
"deno_typescript",
|
||||
"js",
|
||||
]
|
||||
|
|
|
@ -18,9 +18,11 @@ path = "lib.rs"
|
|||
name = "deno"
|
||||
path = "main.rs"
|
||||
|
||||
[build-dependencies]
|
||||
deno_typescript = { path = "../deno_typescript", version = "0.19.0" }
|
||||
|
||||
[dependencies]
|
||||
deno = { path = "../core", version = "0.19.0" }
|
||||
deno_cli_snapshots = { path = "../js", version = "0.19.0" }
|
||||
deno_typescript = { path = "../deno_typescript", version = "0.19.0" }
|
||||
|
||||
ansi_term = "0.12.1"
|
||||
|
|
|
@ -14,13 +14,13 @@ fn main() {
|
|||
let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
|
||||
let o = PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
||||
|
||||
let root_names = vec![c.join("main.ts")];
|
||||
let root_names = vec![c.join("js/main.ts")];
|
||||
let bundle = o.join("CLI_SNAPSHOT.js");
|
||||
let state = deno_typescript::compile_bundle(&bundle, root_names).unwrap();
|
||||
assert!(bundle.exists());
|
||||
deno_typescript::mksnapshot_bundle(&bundle, state).unwrap();
|
||||
|
||||
let root_names = vec![c.join("compiler.ts")];
|
||||
let root_names = vec![c.join("js/compiler.ts")];
|
||||
let bundle = o.join("COMPILER_SNAPSHOT.js");
|
||||
let state = deno_typescript::compile_bundle(&bundle, root_names).unwrap();
|
||||
assert!(bundle.exists());
|
|
@ -1284,8 +1284,6 @@ mod tests {
|
|||
assert!(r.is_err());
|
||||
|
||||
let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.unwrap()
|
||||
.join("js/main.ts")
|
||||
.to_owned();
|
||||
let specifier =
|
||||
|
@ -1308,8 +1306,6 @@ mod tests {
|
|||
assert!(r.is_err());
|
||||
|
||||
let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.unwrap()
|
||||
.join("js/main.ts")
|
||||
.to_owned();
|
||||
let specifier =
|
||||
|
|
|
@ -4,6 +4,7 @@ pub static CLI_SNAPSHOT: &[u8] =
|
|||
include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.bin"));
|
||||
pub static CLI_SNAPSHOT_MAP: &[u8] =
|
||||
include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.js.map"));
|
||||
#[allow(dead_code)]
|
||||
pub static CLI_SNAPSHOT_DTS: &[u8] =
|
||||
include_bytes!(concat!(env!("OUT_DIR"), "/CLI_SNAPSHOT.d.ts"));
|
||||
|
||||
|
@ -11,10 +12,11 @@ pub static COMPILER_SNAPSHOT: &[u8] =
|
|||
include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.bin"));
|
||||
pub static COMPILER_SNAPSHOT_MAP: &[u8] =
|
||||
include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.js.map"));
|
||||
#[allow(dead_code)]
|
||||
pub static COMPILER_SNAPSHOT_DTS: &[u8] =
|
||||
include_bytes!(concat!(env!("OUT_DIR"), "/COMPILER_SNAPSHOT.d.ts"));
|
||||
|
||||
static DENO_RUNTIME: &str = include_str!("lib.deno_runtime.d.ts");
|
||||
static DENO_RUNTIME: &str = include_str!("js/lib.deno_runtime.d.ts");
|
||||
|
||||
/// Same as deno_typescript::get_asset but also has lib.deno_runtime.d.ts
|
||||
pub fn get_asset(name: &str) -> Option<&'static str> {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue