mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 00:59:24 -05:00
parent
f65d5fb312
commit
6830370c3e
22 changed files with 42 additions and 49 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
@ -1,8 +1,8 @@
|
|||
/src/out/
|
||||
/out/
|
||||
node_modules
|
||||
/src/v8/
|
||||
/src/tools/protoc_wrapper/
|
||||
/src/third_party/protobuf/
|
||||
/src/third_party/zlib/
|
||||
/src/third_party/rust_crates/libc/
|
||||
/src/.gclient_entries
|
||||
/v8/
|
||||
/tools/protoc_wrapper/
|
||||
/third_party/protobuf/
|
||||
/third_party/zlib/
|
||||
/third_party/rust_crates/libc/
|
||||
/.gclient_entries
|
||||
|
|
|
@ -19,7 +19,6 @@ before_install: |
|
|||
fi
|
||||
install:
|
||||
- export PATH=$PATH:$DEPOT_TOOLS_PATH
|
||||
- cd src
|
||||
# Sync dependencies.
|
||||
# TODO(ry) These sync steps are very terrible and only here temporarily.
|
||||
# A single deno_deps git submodule should be created which contains V8,
|
||||
|
@ -29,7 +28,7 @@ install:
|
|||
- curl -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
- export PATH=$HOME/.cargo/bin:$PATH
|
||||
- rustc --version
|
||||
- (cd js; yarn)
|
||||
- (cd src/js; yarn)
|
||||
- gclient sync -j2 --no-history
|
||||
# ccache needs the custom LLVM to be in PATH and other variables.
|
||||
- export PATH=`pwd`/third_party/llvm-build/Release+Asserts/bin:$PATH
|
||||
|
|
|
@ -9,7 +9,7 @@ config("deno_config") {
|
|||
}
|
||||
|
||||
rust_executable("deno") {
|
||||
source_root = "main.rs"
|
||||
source_root = "src/main.rs"
|
||||
rust_deps = [ ":libc" ]
|
||||
deps = [
|
||||
":libdeno",
|
||||
|
@ -26,7 +26,7 @@ rust_library("libc") {
|
|||
|
||||
executable("mock_main") {
|
||||
sources = [
|
||||
"mock_main.cc",
|
||||
"src/mock_main.cc",
|
||||
]
|
||||
deps = [
|
||||
":libdeno",
|
||||
|
@ -39,9 +39,9 @@ executable("mock_main") {
|
|||
executable("mock_runtime_test") {
|
||||
testonly = true
|
||||
sources = [
|
||||
"file_util_test.cc",
|
||||
"from_snapshot.cc",
|
||||
"mock_runtime_test.cc",
|
||||
"src/file_util_test.cc",
|
||||
"src/from_snapshot.cc",
|
||||
"src/mock_runtime_test.cc",
|
||||
]
|
||||
deps = [
|
||||
":create_snapshot_mock_runtime",
|
||||
|
@ -55,7 +55,7 @@ executable("mock_runtime_test") {
|
|||
static_library("libdeno") {
|
||||
complete_static_lib = true
|
||||
sources = [
|
||||
"from_snapshot.cc",
|
||||
"src/from_snapshot.cc",
|
||||
]
|
||||
deps = [
|
||||
":create_snapshot_deno",
|
||||
|
@ -66,11 +66,11 @@ static_library("libdeno") {
|
|||
|
||||
v8_source_set("deno_nosnapshot") {
|
||||
sources = [
|
||||
"deno.cc",
|
||||
"deno_internal.h",
|
||||
"file_util.cc",
|
||||
"file_util.h",
|
||||
"include/deno.h",
|
||||
"src/deno.cc",
|
||||
"src/deno_internal.h",
|
||||
"src/file_util.cc",
|
||||
"src/file_util.h",
|
||||
"src/include/deno.h",
|
||||
]
|
||||
deps = [
|
||||
"v8:v8_monolith",
|
||||
|
@ -80,7 +80,7 @@ v8_source_set("deno_nosnapshot") {
|
|||
|
||||
executable("snapshot_creator") {
|
||||
sources = [
|
||||
"snapshot_creator.cc",
|
||||
"src/snapshot_creator.cc",
|
||||
]
|
||||
deps = [
|
||||
":deno_nosnapshot",
|
||||
|
@ -90,7 +90,7 @@ executable("snapshot_creator") {
|
|||
|
||||
proto_library("msg_proto") {
|
||||
sources = [
|
||||
"msg.proto",
|
||||
"src/msg.proto",
|
||||
]
|
||||
generate_python = false
|
||||
}
|
||||
|
@ -98,10 +98,10 @@ proto_library("msg_proto") {
|
|||
run_node("bundle") {
|
||||
out_dir = "$target_gen_dir/bundle/"
|
||||
sources = [
|
||||
"js/main.ts",
|
||||
"js/msg.pb.d.ts",
|
||||
"js/msg.pb.js",
|
||||
"js/package.json", # The `browserslist` field controls Babel behavior.
|
||||
"src/js/main.ts",
|
||||
"src/js/msg.pb.d.ts",
|
||||
"src/js/msg.pb.js",
|
||||
"src/js/package.json", # The `browserslist` field controls Babel behavior.
|
||||
]
|
||||
outputs = [
|
||||
out_dir + "main.js",
|
||||
|
@ -116,19 +116,19 @@ run_node("bundle") {
|
|||
"--no-minify",
|
||||
"--out-dir",
|
||||
rebase_path(out_dir, root_build_dir),
|
||||
rebase_path("js/main.ts", root_build_dir),
|
||||
rebase_path("src/js/main.ts", root_build_dir),
|
||||
]
|
||||
}
|
||||
|
||||
# Due to bugs in Parcel we must run TSC independently in order to catch errors.
|
||||
# https://github.com/parcel-bundler/parcel/issues/954
|
||||
run_node("run_tsc") {
|
||||
main = "js/main.ts"
|
||||
tsconfig = "js/tsconfig.json"
|
||||
main = "src/js/main.ts"
|
||||
tsconfig = "src/js/tsconfig.json"
|
||||
out_dir = "$target_gen_dir/tsc_dist/"
|
||||
sources = [
|
||||
"js/msg.pb.d.ts",
|
||||
"js/msg.pb.js",
|
||||
"src/js/msg.pb.d.ts",
|
||||
"src/js/msg.pb.js",
|
||||
main,
|
||||
tsconfig,
|
||||
]
|
||||
|
@ -156,9 +156,9 @@ run_node("run_tsc") {
|
|||
# be removed at some point. If msg.proto is changed, commit changes to the
|
||||
# generated JS files. The stamp file is just to make gn work.
|
||||
action("protobufjs") {
|
||||
script = "js/pbjs_hack.py"
|
||||
script = "src/js/pbjs_hack.py"
|
||||
sources = [
|
||||
"msg.proto",
|
||||
"src/msg.proto",
|
||||
]
|
||||
outputs = [
|
||||
"$target_gen_dir/pbjs_hack.stamp",
|
||||
|
@ -180,6 +180,6 @@ create_snapshot("deno") {
|
|||
# Generates $target_gen_dir/snapshot_mock_runtime.cc
|
||||
create_snapshot("mock_runtime") {
|
||||
testonly = true
|
||||
js = "js/mock_runtime.js"
|
||||
js = "src/js/mock_runtime.js"
|
||||
deps = []
|
||||
}
|
|
@ -71,10 +71,7 @@ You need [yarn](https://yarnpkg.com/lang/en/docs/install/) installed.
|
|||
|
||||
You need [rust](https://www.rust-lang.org/en-US/install.html) installed.
|
||||
|
||||
Go to `src/` folder:
|
||||
``` bash
|
||||
cd src/
|
||||
```
|
||||
You need [ccache](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/ccache) installed.
|
||||
|
||||
Fetch packages and v8:
|
||||
``` bash
|
||||
|
@ -83,7 +80,7 @@ gclient sync --no-history
|
|||
|
||||
Install the javascript deps.
|
||||
|
||||
(cd js; yarn install)
|
||||
(cd src/js; yarn install)
|
||||
|
||||
gn gen out/Debug --args='cc_wrapper="ccache" is_debug=true '
|
||||
|
||||
|
|
1
build_overrides
Symbolic link
1
build_overrides
Symbolic link
|
@ -0,0 +1 @@
|
|||
v8/build_overrides
|
|
@ -1,7 +1,7 @@
|
|||
template("run_node") {
|
||||
action(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
script = "js/run_node.py"
|
||||
script = "src/js/run_node.py"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ template("rust_executable") {
|
|||
stdlib_target = target_name + "_stdlib"
|
||||
rust_crate(stdlib_target) {
|
||||
crate_type = "staticlib"
|
||||
source_root = "empty.rs"
|
||||
source_root = "src/empty.rs"
|
||||
}
|
||||
|
||||
executable(target_name) {
|
|
@ -1 +0,0 @@
|
|||
v8/build_overrides/
|
1
src/third_party/googletest
vendored
1
src/third_party/googletest
vendored
|
@ -1 +0,0 @@
|
|||
../v8/third_party/googletest/
|
1
src/third_party/jinja2
vendored
1
src/third_party/jinja2
vendored
|
@ -1 +0,0 @@
|
|||
../v8/third_party/jinja2/
|
1
src/third_party/llvm-build
vendored
1
src/third_party/llvm-build
vendored
|
@ -1 +0,0 @@
|
|||
../v8/third_party/llvm-build/
|
1
src/third_party/markupsafe
vendored
1
src/third_party/markupsafe
vendored
|
@ -1 +0,0 @@
|
|||
../v8/third_party/markupsafe/
|
1
third_party/googletest
vendored
Symbolic link
1
third_party/googletest
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../v8/third_party/googletest
|
1
third_party/jinja2
vendored
Symbolic link
1
third_party/jinja2
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../v8/third_party/jinja2
|
1
third_party/llvm-build
vendored
Symbolic link
1
third_party/llvm-build
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../v8/third_party/llvm-build
|
1
third_party/markupsafe
vendored
Symbolic link
1
third_party/markupsafe
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../v8/third_party/markupsafe
|
|
@ -3,12 +3,9 @@ set -e
|
|||
cd `dirname "$0"`/..
|
||||
clang-format -i -style Google src/*.cc src/*.h src/include/*.h
|
||||
|
||||
# TODO(ry) Remove pushd/popd once .gn is moved to root.
|
||||
pushd src/
|
||||
gn format BUILD.gn
|
||||
gn format deno.gni
|
||||
gn format .gn
|
||||
popd
|
||||
|
||||
yapf -i src/js/*.py
|
||||
prettier --write \
|
||||
|
|
Loading…
Reference in a new issue