aboutsummaryrefslogtreecommitdiff
path: root/node_modules/require-main-filename
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/require-main-filename')
-rw-r--r--node_modules/require-main-filename/.npmignore3
-rw-r--r--node_modules/require-main-filename/.travis.yml8
-rw-r--r--node_modules/require-main-filename/LICENSE.txt14
-rw-r--r--node_modules/require-main-filename/README.md26
-rw-r--r--node_modules/require-main-filename/index.js18
-rw-r--r--node_modules/require-main-filename/package.json30
-rw-r--r--node_modules/require-main-filename/test.js36
7 files changed, 0 insertions, 135 deletions
diff --git a/node_modules/require-main-filename/.npmignore b/node_modules/require-main-filename/.npmignore
deleted file mode 100644
index 6f9fe6bad..000000000
--- a/node_modules/require-main-filename/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-.DS_Store
-.nyc_output
diff --git a/node_modules/require-main-filename/.travis.yml b/node_modules/require-main-filename/.travis.yml
deleted file mode 100644
index ab61ce77e..000000000
--- a/node_modules/require-main-filename/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-os:
- - linux
-node_js:
- - "0.10"
- - "0.12"
- - "4.1"
- - "node"
diff --git a/node_modules/require-main-filename/LICENSE.txt b/node_modules/require-main-filename/LICENSE.txt
deleted file mode 100644
index 836440bef..000000000
--- a/node_modules/require-main-filename/LICENSE.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2016, Contributors
-
-Permission to use, copy, modify, and/or distribute this software
-for any purpose with or without fee is hereby granted, provided
-that the above copyright notice and this permission notice
-appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
-LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
-OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/require-main-filename/README.md b/node_modules/require-main-filename/README.md
deleted file mode 100644
index 820d9f589..000000000
--- a/node_modules/require-main-filename/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# require-main-filename
-
-[![Build Status](https://travis-ci.org/yargs/require-main-filename.png)](https://travis-ci.org/yargs/require-main-filename)
-[![Coverage Status](https://coveralls.io/repos/yargs/require-main-filename/badge.svg?branch=master)](https://coveralls.io/r/yargs/require-main-filename?branch=master)
-[![NPM version](https://img.shields.io/npm/v/require-main-filename.svg)](https://www.npmjs.com/package/require-main-filename)
-
-`require.main.filename` is great for figuring out the entry
-point for the current application. This can be combined with a module like
-[pkg-conf](https://www.npmjs.com/package/pkg-conf) to, _as if by magic_, load
-top-level configuration.
-
-Unfortunately, `require.main.filename` sometimes fails when an application is
-executed with an alternative process manager, e.g., [iisnode](https://github.com/tjanczuk/iisnode).
-
-`require-main-filename` is a shim that addresses this problem.
-
-## Usage
-
-```js
-var main = require('require-main-filename')()
-// use main as an alternative to require.main.filename.
-```
-
-## License
-
-ISC
diff --git a/node_modules/require-main-filename/index.js b/node_modules/require-main-filename/index.js
deleted file mode 100644
index dca7f0cc1..000000000
--- a/node_modules/require-main-filename/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = function (_require) {
- _require = _require || require
- var main = _require.main
- if (main && isIISNode(main)) return handleIISNode(main)
- else return main ? main.filename : process.cwd()
-}
-
-function isIISNode (main) {
- return /\\iisnode\\/.test(main.filename)
-}
-
-function handleIISNode (main) {
- if (!main.children.length) {
- return main.filename
- } else {
- return main.children[0].filename
- }
-}
diff --git a/node_modules/require-main-filename/package.json b/node_modules/require-main-filename/package.json
deleted file mode 100644
index 558db27b5..000000000
--- a/node_modules/require-main-filename/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "require-main-filename",
- "version": "1.0.1",
- "description": "shim for require.main.filename() that works in as many environments as possible",
- "main": "index.js",
- "scripts": {
- "pretest": "standard",
- "test": "tap --coverage test.js"
- },
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/yargs/require-main-filename.git"
- },
- "keywords": [
- "require",
- "shim",
- "iisnode"
- ],
- "author": "Ben Coe <ben@npmjs.com>",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/yargs/require-main-filename/issues"
- },
- "homepage": "https://github.com/yargs/require-main-filename#readme",
- "devDependencies": {
- "chai": "^3.5.0",
- "standard": "^6.0.5",
- "tap": "^5.2.0"
- }
-}
diff --git a/node_modules/require-main-filename/test.js b/node_modules/require-main-filename/test.js
deleted file mode 100644
index d89e7dcba..000000000
--- a/node_modules/require-main-filename/test.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* global describe, it */
-
-var requireMainFilename = require('./')
-
-require('tap').mochaGlobals()
-require('chai').should()
-
-describe('require-main-filename', function () {
- it('returns require.main.filename in normal circumstances', function () {
- requireMainFilename().should.match(/test\.js/)
- })
-
- it('should use children[0].filename when running on iisnode', function () {
- var main = {
- filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js',
- children: [ {filename: 'D:\\home\\site\\wwwroot\\server.js'} ]
- }
- requireMainFilename({
- main: main
- }).should.match(/server\.js/)
- })
-
- it('should not use children[0] if no children exist', function () {
- var main = {
- filename: 'D:\\Program Files (x86)\\iisnode\\interceptor.js',
- children: []
- }
- requireMainFilename({
- main: main
- }).should.match(/interceptor\.js/)
- })
-
- it('should default to process.cwd() if require.main is undefined', function () {
- requireMainFilename({}).should.match(/require-main-filename/)
- })
-})