docs: Add Environment Variables
authorCheng Zhao <zcbenz@gmail.com>
Thu, 26 Nov 2015 12:37:48 +0000 (20:37 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 26 Nov 2015 12:37:48 +0000 (20:37 +0800)
docs/README.md
docs/api/environment-variables.md [new file with mode: 0644]

index 9b6372524bd3e4a0c056b84995df38d34fa51f51..917f4050b3d35e8cdd9551ac92728b81624234c7 100644 (file)
@@ -30,6 +30,7 @@ select the tag that matches your version.
 * [Synopsis](api/synopsis.md)
 * [Process Object](api/process.md)
 * [Supported Chrome Command Line Switches](api/chrome-command-line-switches.md)
+* [Environment Variables](api/environment-variables.md)
 
 ### Custom DOM Elements:
 
diff --git a/docs/api/environment-variables.md b/docs/api/environment-variables.md
new file mode 100644 (file)
index 0000000..76cf430
--- /dev/null
@@ -0,0 +1,32 @@
+# Environment variables
+
+Some behaviors of Electron are controlled by environment variables, because they
+are initialized earlier than command line and the app's code.
+
+## `ELECTRON_RUN_AS_NODE`
+
+Starts the process as a normal Node.js process.
+
+## `ELECTRON_ENABLE_LOGGING`
+
+Prints Chrome's internal logging to console.
+
+## `ELECTRON_ENABLE_STACK_DUMPING`
+
+When Electron crashed, prints the stack trace to console.
+
+This environment variable will not work if `crashReporter` is started.
+
+## `ELECTRON_DEFAULT_ERROR_MODE` _Windows_
+
+Shows Windows's crash dialog when Electron crashed.
+
+This environment variable will not work if `crashReporter` is started.
+
+## `ELECTRON_FORCE_WINDOW_MENU_BAR` _Linux_
+
+Don't use global menu bar on Linux.
+
+## `ELECTRON_HIDE_INTERNAL_MODULES`
+
+Turns off compatibility mode for old built-in modules like `require('ipc')`.