mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
Remove deno_typescript (#6813)
This commit is contained in:
parent
903d28f872
commit
2460689b1a
17 changed files with 23 additions and 148 deletions
24
cli/build.rs
24
cli/build.rs
|
@ -1,4 +1,6 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
//
|
||||
mod op_fetch_asset;
|
||||
|
||||
use deno_core::js_check;
|
||||
use deno_core::CoreIsolate;
|
||||
|
@ -64,16 +66,23 @@ fn create_compiler_snapshot(
|
|||
);
|
||||
runtime_isolate.register_op(
|
||||
"op_fetch_asset",
|
||||
deno_typescript::op_fetch_asset(custom_libs),
|
||||
op_fetch_asset::op_fetch_asset(custom_libs),
|
||||
);
|
||||
|
||||
js_check(
|
||||
runtime_isolate.execute("typescript.js", deno_typescript::TYPESCRIPT_CODE),
|
||||
);
|
||||
js_check(runtime_isolate.execute(
|
||||
"typescript.js",
|
||||
&std::fs::read_to_string("typescript/lib/typescript.js").unwrap(),
|
||||
));
|
||||
|
||||
create_snapshot(runtime_isolate, snapshot_path, files);
|
||||
}
|
||||
|
||||
fn ts_version() -> String {
|
||||
let data = include_str!("typescript/package.json");
|
||||
let pkg: serde_json::Value = serde_json::from_str(data).unwrap();
|
||||
pkg["version"].as_str().unwrap().to_string()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// Don't build V8 if "cargo doc" is being run. This is to support docs.rs.
|
||||
if env::var_os("RUSTDOCFLAGS").is_some() {
|
||||
|
@ -81,12 +90,9 @@ fn main() {
|
|||
}
|
||||
|
||||
// To debug snapshot issues uncomment:
|
||||
// deno_typescript::trace_serializer();
|
||||
// op_fetch_asset::trace_serializer();
|
||||
|
||||
println!(
|
||||
"cargo:rustc-env=TS_VERSION={}",
|
||||
deno_typescript::ts_version()
|
||||
);
|
||||
println!("cargo:rustc-env=TS_VERSION={}", ts_version());
|
||||
|
||||
println!(
|
||||
"cargo:rustc-env=TARGET={}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue