1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 07:44:48 -05:00

Dedup js source list in BUILD.gn

This commit is contained in:
Ryan Dahl 2018-09-12 10:33:30 -04:00
parent 88d42f0b18
commit cb6c78c6d2

View file

@ -52,6 +52,36 @@ main_extern = [
":msg_rs", ":msg_rs",
] ]
ts_sources = [
"js/assets.ts",
"js/compiler.ts",
"js/console.ts",
"js/deno.ts",
"js/dispatch.ts",
"js/errors.ts",
"js/fetch.ts",
"js/fetch_types.d.ts",
"js/global-eval.ts",
"js/globals.ts",
"js/libdeno.ts",
"js/main.ts",
"js/mkdir.ts",
"js/mock_builtin.js",
"js/os.ts",
"js/plugins.d.ts",
"js/read_file.ts",
"js/remove.ts",
"js/rename.ts",
"js/stat.ts",
"js/text_encoding.ts",
"js/timers.ts",
"js/types.ts",
"js/util.ts",
"js/v8_source_maps.ts",
"js/write_file.ts",
"tsconfig.json",
]
rust_executable("deno") { rust_executable("deno") {
source_root = "src/main.rs" source_root = "src/main.rs"
extern = main_extern extern = main_extern
@ -186,30 +216,7 @@ executable("snapshot_creator") {
# in the runtime bundle # in the runtime bundle
run_node("gen_declarations") { run_node("gen_declarations") {
out_dir = target_gen_dir out_dir = target_gen_dir
sources = [ sources = ts_sources
"js/assets.ts",
"js/compiler.ts",
"js/console.ts",
"js/deno.ts",
"js/dispatch.ts",
"js/errors.ts",
"js/fetch.ts",
"js/global-eval.ts",
"js/globals.ts",
"js/mkdir.ts",
"js/os.ts",
"js/read_file.ts",
"js/rename.ts",
"js/remove.ts",
"js/stat.ts",
"js/text_encoding.ts",
"js/timers.ts",
"js/tsconfig.generated.json",
"js/types.ts",
"js/util.ts",
"js/v8_source_maps.ts",
"js/write_file.ts",
]
outputs = [ outputs = [
"$out_dir/types/globals.d.ts", "$out_dir/types/globals.d.ts",
] ]
@ -229,32 +236,8 @@ run_node("gen_declarations") {
run_node("bundle") { run_node("bundle") {
out_dir = "$target_gen_dir/bundle/" out_dir = "$target_gen_dir/bundle/"
sources = [ sources = ts_sources + [
"js/assets.ts",
"js/compiler.ts",
"js/console.ts",
"js/dispatch.ts",
"js/errors.ts",
"js/fetch.ts",
"js/fetch_types.d.ts",
"js/globals.ts",
"js/main.ts",
"js/mkdir.ts",
"js/os.ts",
"js/plugins.d.ts",
"js/read_file.ts",
"js/rename.ts",
"js/remove.ts",
"js/stat.ts",
"js/text_encoding.ts",
"js/timers.ts",
"js/types.ts",
"js/util.ts",
"js/v8_source_maps.ts",
"js/write_file.ts",
"rollup.config.js", "rollup.config.js",
"src/msg.fbs",
"tsconfig.json",
] ]
outputs = [ outputs = [
out_dir + "main.js", out_dir + "main.js",