mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
parent
9528ee4a42
commit
ea35281d63
16 changed files with 25 additions and 25 deletions
|
@ -5,7 +5,7 @@ branches:
|
||||||
cache:
|
cache:
|
||||||
ccache: true
|
ccache: true
|
||||||
directories:
|
directories:
|
||||||
- src/js/node_modules/
|
- js/node_modules/
|
||||||
- $DEPOT_TOOLS_PATH
|
- $DEPOT_TOOLS_PATH
|
||||||
- $BUILD_PATH
|
- $BUILD_PATH
|
||||||
env:
|
env:
|
||||||
|
@ -28,7 +28,7 @@ install:
|
||||||
- curl -sSf https://sh.rustup.rs | sh -s -- -y
|
- curl -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
- export PATH=$HOME/.cargo/bin:$PATH
|
- export PATH=$HOME/.cargo/bin:$PATH
|
||||||
- rustc --version
|
- rustc --version
|
||||||
- (cd src/js; yarn)
|
- (cd js; yarn)
|
||||||
- gclient sync -j2 --no-history
|
- gclient sync -j2 --no-history
|
||||||
# ccache needs the custom LLVM to be in PATH and other variables.
|
# ccache needs the custom LLVM to be in PATH and other variables.
|
||||||
- export PATH=`pwd`/third_party/llvm-build/Release+Asserts/bin:$PATH
|
- export PATH=`pwd`/third_party/llvm-build/Release+Asserts/bin:$PATH
|
||||||
|
|
22
BUILD.gn
22
BUILD.gn
|
@ -98,10 +98,10 @@ proto_library("msg_proto") {
|
||||||
run_node("bundle") {
|
run_node("bundle") {
|
||||||
out_dir = "$target_gen_dir/bundle/"
|
out_dir = "$target_gen_dir/bundle/"
|
||||||
sources = [
|
sources = [
|
||||||
"src/js/main.ts",
|
"js/main.ts",
|
||||||
"src/js/msg.pb.d.ts",
|
"js/msg.pb.d.ts",
|
||||||
"src/js/msg.pb.js",
|
"js/msg.pb.js",
|
||||||
"src/js/package.json", # The `browserslist` field controls Babel behavior.
|
"js/package.json", # The `browserslist` field controls Babel behavior.
|
||||||
]
|
]
|
||||||
outputs = [
|
outputs = [
|
||||||
out_dir + "main.js",
|
out_dir + "main.js",
|
||||||
|
@ -116,19 +116,19 @@ run_node("bundle") {
|
||||||
"--no-minify",
|
"--no-minify",
|
||||||
"--out-dir",
|
"--out-dir",
|
||||||
rebase_path(out_dir, root_build_dir),
|
rebase_path(out_dir, root_build_dir),
|
||||||
rebase_path("src/js/main.ts", root_build_dir),
|
rebase_path("js/main.ts", root_build_dir),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Due to bugs in Parcel we must run TSC independently in order to catch errors.
|
# Due to bugs in Parcel we must run TSC independently in order to catch errors.
|
||||||
# https://github.com/parcel-bundler/parcel/issues/954
|
# https://github.com/parcel-bundler/parcel/issues/954
|
||||||
run_node("run_tsc") {
|
run_node("run_tsc") {
|
||||||
main = "src/js/main.ts"
|
main = "js/main.ts"
|
||||||
tsconfig = "src/js/tsconfig.json"
|
tsconfig = "tsconfig.json"
|
||||||
out_dir = "$target_gen_dir/tsc_dist/"
|
out_dir = "$target_gen_dir/tsc_dist/"
|
||||||
sources = [
|
sources = [
|
||||||
"src/js/msg.pb.d.ts",
|
"js/msg.pb.d.ts",
|
||||||
"src/js/msg.pb.js",
|
"js/msg.pb.js",
|
||||||
main,
|
main,
|
||||||
tsconfig,
|
tsconfig,
|
||||||
]
|
]
|
||||||
|
@ -156,7 +156,7 @@ run_node("run_tsc") {
|
||||||
# be removed at some point. If msg.proto is changed, commit changes to the
|
# 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.
|
# generated JS files. The stamp file is just to make gn work.
|
||||||
action("protobufjs") {
|
action("protobufjs") {
|
||||||
script = "src/js/pbjs_hack.py"
|
script = "js/pbjs_hack.py"
|
||||||
sources = [
|
sources = [
|
||||||
"src/msg.proto",
|
"src/msg.proto",
|
||||||
]
|
]
|
||||||
|
@ -180,6 +180,6 @@ create_snapshot("deno") {
|
||||||
# Generates $target_gen_dir/snapshot_mock_runtime.cc
|
# Generates $target_gen_dir/snapshot_mock_runtime.cc
|
||||||
create_snapshot("mock_runtime") {
|
create_snapshot("mock_runtime") {
|
||||||
testonly = true
|
testonly = true
|
||||||
js = "src/js/mock_runtime.js"
|
js = "js/mock_runtime.js"
|
||||||
deps = []
|
deps = []
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ gclient sync --no-history
|
||||||
|
|
||||||
Install the javascript deps.
|
Install the javascript deps.
|
||||||
|
|
||||||
(cd src/js; yarn install)
|
(cd js; yarn install)
|
||||||
|
|
||||||
gn gen out/Debug --args='cc_wrapper="ccache" is_debug=true '
|
gn gen out/Debug --args='cc_wrapper="ccache" is_debug=true '
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ infrastructure.
|
||||||
|
|
||||||
|
|
||||||
The current implementation is out of sync with this document:
|
The current implementation is out of sync with this document:
|
||||||
https://github.com/ry/deno/blob/master/src/js/deno.d.ts
|
https://github.com/ry/deno/blob/master/js/deno.d.ts
|
||||||
|
|
||||||
#### L1 Examples
|
#### L1 Examples
|
||||||
|
|
||||||
|
|
2
deno.gni
2
deno.gni
|
@ -1,7 +1,7 @@
|
||||||
template("run_node") {
|
template("run_node") {
|
||||||
action(target_name) {
|
action(target_name) {
|
||||||
forward_variables_from(invoker, "*")
|
forward_variables_from(invoker, "*")
|
||||||
script = "src/js/run_node.py"
|
script = "js/run_node.py"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
0
src/js/deno.d.ts → js/deno.d.ts
vendored
0
src/js/deno.d.ts → js/deno.d.ts
vendored
0
src/js/msg.pb.d.ts → js/msg.pb.d.ts
vendored
0
src/js/msg.pb.d.ts → js/msg.pb.d.ts
vendored
|
@ -7,14 +7,14 @@ gn format BUILD.gn
|
||||||
gn format deno.gni
|
gn format deno.gni
|
||||||
gn format .gn
|
gn format .gn
|
||||||
|
|
||||||
yapf -i src/js/*.py
|
yapf -i js/*.py
|
||||||
prettier --write \
|
prettier --write \
|
||||||
src/js/deno.d.ts \
|
js/deno.d.ts \
|
||||||
src/js/main.ts \
|
js/main.ts \
|
||||||
src/js/mock_runtime.js \
|
js/mock_runtime.js \
|
||||||
src/js/tsconfig.json
|
tsconfig.json
|
||||||
# Do not format these.
|
# Do not format these.
|
||||||
# src/js/msg.pb.js
|
# js/msg.pb.js
|
||||||
# src/js/msg.pb.d.ts
|
# js/msg.pb.d.ts
|
||||||
|
|
||||||
rustfmt --write-mode overwrite src/*.rs
|
rustfmt --write-mode overwrite src/*.rs
|
||||||
|
|
|
@ -13,6 +13,6 @@
|
||||||
"allowUnreachableCode": false,
|
"allowUnreachableCode": false,
|
||||||
"experimentalDecorators": true
|
"experimentalDecorators": true
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.js"],
|
"include": ["js/**/*.ts", "js/**/*.js"],
|
||||||
"exclude": ["mock_runtime.js", "node_modules"]
|
"exclude": ["js/mock_runtime.js", "js/node_modules"]
|
||||||
}
|
}
|
Loading…
Reference in a new issue