aboutsummaryrefslogtreecommitdiff
path: root/node_modules/std-env
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/std-env
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/std-env')
-rw-r--r--node_modules/std-env/README.md42
-rw-r--r--node_modules/std-env/index.js18
l---------node_modules/std-env/node_modules/.bin/is-ci1
-rw-r--r--node_modules/std-env/package.json22
-rw-r--r--node_modules/std-env/yarn.lock13
5 files changed, 96 insertions, 0 deletions
diff --git a/node_modules/std-env/README.md b/node_modules/std-env/README.md
new file mode 100644
index 00000000..fae83c8e
--- /dev/null
+++ b/node_modules/std-env/README.md
@@ -0,0 +1,42 @@
+# STD-ENV
+
+Detect running environment of the current Node.js process.
+
+## Installation
+
+Using yarn:
+
+```
+yarn add std-env
+```
+
+Usin npm:
+
+```
+npm i std-env
+```
+
+## Usage
+
+```js
+cost env = require('std-env')
+
+console.log(env)
+
+/*
+{
+ test: false,
+ dev: true,
+ production: false,
+ debug: false,
+ ci: false,
+ tty: true,
+ minimalCLI: false,
+ windows: false
+}
+*/
+```
+
+## License
+
+MIT
diff --git a/node_modules/std-env/index.js b/node_modules/std-env/index.js
new file mode 100644
index 00000000..7fd91355
--- /dev/null
+++ b/node_modules/std-env/index.js
@@ -0,0 +1,18 @@
+const isCI = require('is-ci')
+
+const { DEBUG, NODE_ENV = 'development' } = process.env
+
+const env = {
+ test: NODE_ENV === 'test',
+ dev: NODE_ENV === 'development' || NODE_ENV === 'dev',
+ production: NODE_ENV === 'production',
+ debug: Boolean(DEBUG),
+ ci: Boolean(isCI),
+ tty: Boolean(process.stdout.isTTY),
+ minimalCLI: undefined,
+ windows: /^win/.test(process.platform)
+}
+
+env.minimalCLI = env.ci || env.test || env.production || !env.tty
+
+module.exports = env
diff --git a/node_modules/std-env/node_modules/.bin/is-ci b/node_modules/std-env/node_modules/.bin/is-ci
new file mode 120000
index 00000000..00628fcb
--- /dev/null
+++ b/node_modules/std-env/node_modules/.bin/is-ci
@@ -0,0 +1 @@
+../../../is-ci/bin.js \ No newline at end of file
diff --git a/node_modules/std-env/package.json b/node_modules/std-env/package.json
new file mode 100644
index 00000000..abf24bbb
--- /dev/null
+++ b/node_modules/std-env/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "std-env",
+ "version": "1.3.1",
+ "description": "Detect running environment of the current Node.js process",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/pi0/std-env.git"
+ },
+ "author": "Pooya Parsa <pooya@pi0.ir>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/pi0/std-env/issues"
+ },
+ "homepage": "https://github.com/pi0/std-env#readme",
+ "dependencies": {
+ "is-ci": "^1.1.0"
+ }
+}
diff --git a/node_modules/std-env/yarn.lock b/node_modules/std-env/yarn.lock
new file mode 100644
index 00000000..90435b33
--- /dev/null
+++ b/node_modules/std-env/yarn.lock
@@ -0,0 +1,13 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+ci-info@^1.0.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2"
+
+is-ci@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5"
+ dependencies:
+ ci-info "^1.0.0"