Add an option to detect node at runtime

Sometimes builds are done once and used in both the browser and in node, so add
an option to do runtime detection if necessary
This commit is contained in:
Alex Crichton
2018-03-07 08:50:56 -08:00
parent 48c0f290f9
commit 8254d9f516
5 changed files with 59 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ extern crate test_support;
#[test]
fn works() {
test_support::project()
.detect_node(true)
.file("src/lib.rs", r#"
#![feature(proc_macro)]