summaryrefslogtreecommitdiff
path: root/node_modules/graceful-readlink
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/graceful-readlink')
-rw-r--r--node_modules/graceful-readlink/.npmignore3
-rw-r--r--node_modules/graceful-readlink/.travis.yml5
-rw-r--r--node_modules/graceful-readlink/LICENSE22
-rw-r--r--node_modules/graceful-readlink/README.md17
-rw-r--r--node_modules/graceful-readlink/index.js12
-rw-r--r--node_modules/graceful-readlink/package.json18
6 files changed, 77 insertions, 0 deletions
diff --git a/node_modules/graceful-readlink/.npmignore b/node_modules/graceful-readlink/.npmignore
new file mode 100644
index 0000000..3ac7d16
--- /dev/null
+++ b/node_modules/graceful-readlink/.npmignore
@@ -0,0 +1,3 @@
+.idea/
+.DS_Store
+node_modules/
diff --git a/node_modules/graceful-readlink/.travis.yml b/node_modules/graceful-readlink/.travis.yml
new file mode 100644
index 0000000..baf9be7
--- /dev/null
+++ b/node_modules/graceful-readlink/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.10"
+ - "0.12"
+ - "io.js"
diff --git a/node_modules/graceful-readlink/LICENSE b/node_modules/graceful-readlink/LICENSE
new file mode 100644
index 0000000..d1f842f
--- /dev/null
+++ b/node_modules/graceful-readlink/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Zhiye Li
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/graceful-readlink/README.md b/node_modules/graceful-readlink/README.md
new file mode 100644
index 0000000..fc63b50
--- /dev/null
+++ b/node_modules/graceful-readlink/README.md
@@ -0,0 +1,17 @@
+# graceful-readlink
+[![NPM Version](http://img.shields.io/npm/v/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink)
+[![NPM Downloads](https://img.shields.io/npm/dm/graceful-readlink.svg?style=flat)](https://www.npmjs.org/package/graceful-readlink)
+
+
+## Usage
+
+```js
+var readlinkSync = require('graceful-readlink').readlinkSync;
+console.log(readlinkSync(f));
+// output
+// the file pointed to when `f` is a symbolic link
+// the `f` itself when `f` is not a symbolic link
+```
+## Licence
+
+MIT License
diff --git a/node_modules/graceful-readlink/index.js b/node_modules/graceful-readlink/index.js
new file mode 100644
index 0000000..7e9fc70
--- /dev/null
+++ b/node_modules/graceful-readlink/index.js
@@ -0,0 +1,12 @@
+var fs = require('fs')
+ , lstat = fs.lstatSync;
+
+exports.readlinkSync = function (p) {
+ if (lstat(p).isSymbolicLink()) {
+ return fs.readlinkSync(p);
+ } else {
+ return p;
+ }
+};
+
+
diff --git a/node_modules/graceful-readlink/package.json b/node_modules/graceful-readlink/package.json
new file mode 100644
index 0000000..ac86c1f
--- /dev/null
+++ b/node_modules/graceful-readlink/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "graceful-readlink",
+ "version": "1.0.1",
+ "description": "graceful fs.readlink",
+ "main": "index.js",
+ "repository": "git://github.com/zhiyelee/graceful-readlink.git",
+ "homepage": "https://github.com/zhiyelee/graceful-readlink",
+ "bugs": "https://github.com/zhiyelee/graceful-readlink/issues",
+ "keywords": [
+ "fs.readlink",
+ "readlink"
+ ],
+ "author": "zhiyelee",
+ "license": "MIT",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ }
+}