[Pkg-javascript-commits] [node-graceful-readlink] 01/03: Import Upstream version 1.0.1

Paolo Greppi paolog-guest at moszumanska.debian.org
Wed Dec 28 21:48:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

paolog-guest pushed a commit to branch master
in repository node-graceful-readlink.

commit 08920d1fb818ec1b10208755f3d46713abb98dbb
Author: Paolo Greppi <paolo.greppi at libpf.com>
Date:   Wed Dec 28 21:27:02 2016 +0000

    Import Upstream version 1.0.1
---
 .gitignore   | 19 +++++++++++++++++++
 .npmignore   |  3 +++
 .travis.yml  |  5 +++++
 LICENSE      | 22 ++++++++++++++++++++++
 README.md    | 17 +++++++++++++++++
 index.js     | 12 ++++++++++++
 package.json | 18 ++++++++++++++++++
 7 files changed, 96 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7ccc704
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+
+node_modules
+.idea
+
+
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 0000000..3ac7d16
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,3 @@
+.idea/
+.DS_Store
+node_modules/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..baf9be7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+  - "0.10"
+  - "0.12"
+  - "io.js"
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d1f842f
--- /dev/null
+++ b/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/README.md b/README.md
new file mode 100644
index 0000000..fc63b50
--- /dev/null
+++ b/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/index.js b/index.js
new file mode 100644
index 0000000..7e9fc70
--- /dev/null
+++ b/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/package.json b/package.json
new file mode 100644
index 0000000..ac86c1f
--- /dev/null
+++ b/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"
+  }
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-graceful-readlink.git



More information about the Pkg-javascript-commits mailing list