mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Minor code cleanups (#1570)
This commit is contained in:
parent
2547f0296f
commit
7f88b5fff3
6 changed files with 9 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||||
version: '{build}.{branch}'
|
version: '{build}.{branch}'
|
||||||
|
|
||||||
skip_branch_with_pr: true
|
skip_branch_with_pr: true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||||
sudo: false
|
sudo: false
|
||||||
language: c++
|
language: c++
|
||||||
git:
|
git:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||||
import("//build/compiled_action.gni")
|
import("//build/compiled_action.gni")
|
||||||
|
|
||||||
template("run_node") {
|
template("run_node") {
|
||||||
|
|
|
@ -28,6 +28,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
use std::sync::{Once, ONCE_INIT};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use tokio;
|
use tokio;
|
||||||
|
@ -156,7 +157,7 @@ pub struct Metrics {
|
||||||
pub bytes_received: AtomicUsize,
|
pub bytes_received: AtomicUsize,
|
||||||
}
|
}
|
||||||
|
|
||||||
static DENO_INIT: std::sync::Once = std::sync::ONCE_INIT;
|
static DENO_INIT: Once = ONCE_INIT;
|
||||||
|
|
||||||
impl Isolate {
|
impl Isolate {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from util import enable_ansi_colors, run, find_exts
|
from util import enable_ansi_colors, find_exts, root_path, run
|
||||||
|
|
||||||
enable_ansi_colors()
|
enable_ansi_colors()
|
||||||
|
|
||||||
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
third_party_path = os.path.join(root_path, "third_party")
|
third_party_path = os.path.join(root_path, "third_party")
|
||||||
cpplint = os.path.join(third_party_path, "cpplint", "cpplint.py")
|
cpplint = os.path.join(third_party_path, "cpplint", "cpplint.py")
|
||||||
tslint = os.path.join(third_party_path, "node_modules", "tslint", "bin",
|
tslint = os.path.join(third_party_path, "node_modules", "tslint", "bin",
|
||||||
|
|
|
@ -8,13 +8,12 @@ Before running node, we symlink js/node_modules to out/Debug/node_modules.
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import util
|
from util import remove_and_symlink, root_path, run
|
||||||
|
|
||||||
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
tools_path = os.path.join(root_path, "tools")
|
tools_path = os.path.join(root_path, "tools")
|
||||||
third_party_path = os.path.join(root_path, "third_party")
|
third_party_path = os.path.join(root_path, "third_party")
|
||||||
target_abs = os.path.join(third_party_path, "node_modules")
|
target_abs = os.path.join(third_party_path, "node_modules")
|
||||||
target_rel = os.path.relpath(target_abs)
|
target_rel = os.path.relpath(target_abs)
|
||||||
|
|
||||||
util.remove_and_symlink(target_rel, "node_modules", True)
|
remove_and_symlink(target_rel, "node_modules", True)
|
||||||
util.run(["node"] + sys.argv[1:], quiet=True)
|
run(["node"] + sys.argv[1:], quiet=True)
|
||||||
|
|
Loading…
Reference in a new issue