Merge pull request #4308 from Microsoft/adjustNodeCheck

adjust check for node env to handle webpack\browserify
This commit is contained in:
Vladimir Matveev committed 2015-08-14 11:41:16 -07:00
commit 5fbe3fc75c
2 files changed
+10 -2

No files matched your search

+7 -1
View File
@@ -43,5 +43,11 @@
"build:compiler": "jake local",
"build:tests": "jake tests",
"clean": "jake clean"
}
},
"browser": {
"buffer": false,
"fs": false,
"os": false,
"path": false
}
}
+3 -1
View File
@@ -334,7 +334,9 @@ namespace ts {
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
return getWScriptSystem();
}
else if (typeof module !== "undefined" && module.exports) {
else if (typeof process !== "undefined" && process.nextTick && !process.browser) {
// process and process.nextTick checks if current environment is node-like
// process.browser check excludes webpack and browserify
return getNodeSystem();
}
else {