1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

chore: move //src/js to //js

refs: #285
This commit is contained in:
Yoshiya Hinosawa 2018-07-01 23:37:10 +09:00 committed by Ryan Dahl
parent 9528ee4a42
commit ea35281d63
16 changed files with 25 additions and 25 deletions

View file

@ -5,7 +5,7 @@ branches:
cache:
ccache: true
directories:
- src/js/node_modules/
- js/node_modules/
- $DEPOT_TOOLS_PATH
- $BUILD_PATH
env:
@ -28,7 +28,7 @@ install:
- curl -sSf https://sh.rustup.rs | sh -s -- -y
- export PATH=$HOME/.cargo/bin:$PATH
- rustc --version
- (cd src/js; yarn)
- (cd 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

View file

@ -98,10 +98,10 @@ proto_library("msg_proto") {
run_node("bundle") {
out_dir = "$target_gen_dir/bundle/"
sources = [
"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.
"js/main.ts",
"js/msg.pb.d.ts",
"js/msg.pb.js",
"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("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.
# https://github.com/parcel-bundler/parcel/issues/954
run_node("run_tsc") {
main = "src/js/main.ts"
tsconfig = "src/js/tsconfig.json"
main = "js/main.ts"
tsconfig = "tsconfig.json"
out_dir = "$target_gen_dir/tsc_dist/"
sources = [
"src/js/msg.pb.d.ts",
"src/js/msg.pb.js",
"js/msg.pb.d.ts",
"js/msg.pb.js",
main,
tsconfig,
]
@ -156,7 +156,7 @@ 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 = "src/js/pbjs_hack.py"
script = "js/pbjs_hack.py"
sources = [
"src/msg.proto",
]
@ -180,6 +180,6 @@ create_snapshot("deno") {
# Generates $target_gen_dir/snapshot_mock_runtime.cc
create_snapshot("mock_runtime") {
testonly = true
js = "src/js/mock_runtime.js"
js = "js/mock_runtime.js"
deps = []
}

View file

@ -80,7 +80,7 @@ gclient sync --no-history
Install the javascript deps.
(cd src/js; yarn install)
(cd js; yarn install)
gn gen out/Debug --args='cc_wrapper="ccache" is_debug=true '

View file

@ -157,7 +157,7 @@ infrastructure.
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

View file

@ -1,7 +1,7 @@
template("run_node") {
action(target_name) {
forward_variables_from(invoker, "*")
script = "src/js/run_node.py"
script = "js/run_node.py"
}
}

View file

View file

@ -7,14 +7,14 @@ gn format BUILD.gn
gn format deno.gni
gn format .gn
yapf -i src/js/*.py
yapf -i js/*.py
prettier --write \
src/js/deno.d.ts \
src/js/main.ts \
src/js/mock_runtime.js \
src/js/tsconfig.json
js/deno.d.ts \
js/main.ts \
js/mock_runtime.js \
tsconfig.json
# Do not format these.
# src/js/msg.pb.js
# src/js/msg.pb.d.ts
# js/msg.pb.js
# js/msg.pb.d.ts
rustfmt --write-mode overwrite src/*.rs

View file

@ -13,6 +13,6 @@
"allowUnreachableCode": false,
"experimentalDecorators": true
},
"include": ["**/*.ts", "**/*.js"],
"exclude": ["mock_runtime.js", "node_modules"]
"include": ["js/**/*.ts", "js/**/*.js"],
"exclude": ["js/mock_runtime.js", "js/node_modules"]
}