forked from public/fvtt-cthulhu-eternal
Initial import with skill sheet working
This commit is contained in:
21
node_modules/global-prefix/LICENSE
generated
vendored
Normal file
21
node_modules/global-prefix/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
|
||||
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.
|
78
node_modules/global-prefix/README.md
generated
vendored
Normal file
78
node_modules/global-prefix/README.md
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
# global-prefix [](https://www.npmjs.com/package/global-prefix) [](https://npmjs.org/package/global-prefix) [](https://npmjs.org/package/global-prefix) [](https://travis-ci.org/jonschlinkert/global-prefix) [](https://ci.appveyor.com/project/jonschlinkert/global-prefix)
|
||||
|
||||
> Get the npm global path prefix.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save global-prefix
|
||||
```
|
||||
|
||||
This is partially based on the code used by npm internally to resolve the global prefix.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var prefix = require('global-prefix');
|
||||
//=> '/usr/local' (this path will differ by system and user-defined config)
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.")
|
||||
* [global-paths](https://www.npmjs.com/package/global-paths): Returns an array of unique "global" directories based on the user's platform and environment. The… [more](https://github.com/jonschlinkert/global-paths) | [homepage](https://github.com/jonschlinkert/global-paths "Returns an array of unique "global" directories based on the user's platform and environment. The resulting paths can be used for doing lookups for generators or other globally installed npm packages. Node.js / JavaScript.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 16 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 15 | [doowb](https://github.com/doowb) |
|
||||
| 1 | [rmbaad](https://github.com/rmbaad) |
|
||||
| 1 | [avengerpenguin](https://github.com/avengerpenguin) |
|
||||
| 1 | [jason-chang](https://github.com/jason-chang) |
|
||||
| 1 | [jorrit](https://github.com/jorrit) |
|
||||
| 1 | [mathiasvr](https://github.com/mathiasvr) |
|
||||
| 1 | [tunnckoCore](https://github.com/tunnckoCore) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 28, 2017._
|
96
node_modules/global-prefix/index.js
generated
vendored
Normal file
96
node_modules/global-prefix/index.js
generated
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
/*!
|
||||
* global-prefix <https://github.com/jonschlinkert/global-prefix>
|
||||
*
|
||||
* Copyright (c) 2015-2017 Jon Schlinkert.
|
||||
* Licensed under the MIT license.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var expand = require('expand-tilde');
|
||||
var homedir = require('homedir-polyfill');
|
||||
var ini = require('ini');
|
||||
var prefix;
|
||||
|
||||
function getPrefix() {
|
||||
if (process.env.PREFIX) {
|
||||
prefix = process.env.PREFIX;
|
||||
} else {
|
||||
// Start by checking if the global prefix is set by the user
|
||||
var home = homedir();
|
||||
if (home) {
|
||||
// homedir() returns undefined if $HOME not set; path.resolve requires strings
|
||||
var userConfig = path.resolve(home, '.npmrc');
|
||||
prefix = tryConfigPath(userConfig);
|
||||
}
|
||||
|
||||
if (!prefix) {
|
||||
// Otherwise find the path of npm
|
||||
var npm = tryNpmPath();
|
||||
if (npm) {
|
||||
// Check the built-in npm config file
|
||||
var builtinConfig = path.resolve(npm, '..', '..', 'npmrc');
|
||||
prefix = tryConfigPath(builtinConfig);
|
||||
|
||||
if (prefix) {
|
||||
// Now the global npm config can also be checked.
|
||||
var globalConfig = path.resolve(prefix, 'etc', 'npmrc');
|
||||
prefix = tryConfigPath(globalConfig) || prefix;
|
||||
}
|
||||
}
|
||||
|
||||
if (!prefix) fallback();
|
||||
}
|
||||
}
|
||||
|
||||
if (prefix) {
|
||||
return expand(prefix);
|
||||
}
|
||||
}
|
||||
|
||||
function fallback() {
|
||||
var isWindows = require('is-windows');
|
||||
if (isWindows()) {
|
||||
// c:\node\node.exe --> prefix=c:\node\
|
||||
prefix = process.env.APPDATA
|
||||
? path.join(process.env.APPDATA, 'npm')
|
||||
: path.dirname(process.execPath);
|
||||
} else {
|
||||
// /usr/local/bin/node --> prefix=/usr/local
|
||||
prefix = path.dirname(path.dirname(process.execPath));
|
||||
|
||||
// destdir only is respected on Unix
|
||||
if (process.env.DESTDIR) {
|
||||
prefix = path.join(process.env.DESTDIR, prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function tryNpmPath() {
|
||||
try {
|
||||
return fs.realpathSync(require('which').sync('npm'));
|
||||
} catch (err) {}
|
||||
return null;
|
||||
}
|
||||
|
||||
function tryConfigPath(configPath) {
|
||||
try {
|
||||
var data = fs.readFileSync(configPath, 'utf-8');
|
||||
var config = ini.parse(data);
|
||||
if (config.prefix) return config.prefix;
|
||||
} catch (err) {}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `prefix`
|
||||
*/
|
||||
|
||||
Object.defineProperty(module, 'exports', {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return prefix || (prefix = getPrefix());
|
||||
}
|
||||
});
|
1
node_modules/global-prefix/node_modules/.bin/which
generated
vendored
Symbolic link
1
node_modules/global-prefix/node_modules/.bin/which
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../which/bin/which
|
152
node_modules/global-prefix/node_modules/which/CHANGELOG.md
generated
vendored
Normal file
152
node_modules/global-prefix/node_modules/which/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
# Changes
|
||||
|
||||
|
||||
## 1.3.1
|
||||
|
||||
* update deps
|
||||
* update travis
|
||||
|
||||
## v1.3.0
|
||||
|
||||
* Add nothrow option to which.sync
|
||||
* update tap
|
||||
|
||||
## v1.2.14
|
||||
|
||||
* appveyor: drop node 5 and 0.x
|
||||
* travis-ci: add node 6, drop 0.x
|
||||
|
||||
## v1.2.13
|
||||
|
||||
* test: Pass missing option to pass on windows
|
||||
* update tap
|
||||
* update isexe to 2.0.0
|
||||
* neveragain.tech pledge request
|
||||
|
||||
## v1.2.12
|
||||
|
||||
* Removed unused require
|
||||
|
||||
## v1.2.11
|
||||
|
||||
* Prevent changelog script from being included in package
|
||||
|
||||
## v1.2.10
|
||||
|
||||
* Use env.PATH only, not env.Path
|
||||
|
||||
## v1.2.9
|
||||
|
||||
* fix for paths starting with ../
|
||||
* Remove unused `is-absolute` module
|
||||
|
||||
## v1.2.8
|
||||
|
||||
* bullet items in changelog that contain (but don't start with) #
|
||||
|
||||
## v1.2.7
|
||||
|
||||
* strip 'update changelog' changelog entries out of changelog
|
||||
|
||||
## v1.2.6
|
||||
|
||||
* make the changelog bulleted
|
||||
|
||||
## v1.2.5
|
||||
|
||||
* make a changelog, and keep it up to date
|
||||
* don't include tests in package
|
||||
* Properly handle relative-path executables
|
||||
* appveyor
|
||||
* Attach error code to Not Found error
|
||||
* Make tests pass on Windows
|
||||
|
||||
## v1.2.4
|
||||
|
||||
* Fix typo
|
||||
|
||||
## v1.2.3
|
||||
|
||||
* update isexe, fix regression in pathExt handling
|
||||
|
||||
## v1.2.2
|
||||
|
||||
* update deps, use isexe module, test windows
|
||||
|
||||
## v1.2.1
|
||||
|
||||
* Sometimes windows PATH entries are quoted
|
||||
* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
|
||||
* doc cli
|
||||
|
||||
## v1.2.0
|
||||
|
||||
* Add support for opt.all and -as cli flags
|
||||
* test the bin
|
||||
* update travis
|
||||
* Allow checking for multiple programs in bin/which
|
||||
* tap 2
|
||||
|
||||
## v1.1.2
|
||||
|
||||
* travis
|
||||
* Refactored and fixed undefined error on Windows
|
||||
* Support strict mode
|
||||
|
||||
## v1.1.1
|
||||
|
||||
* test +g exes against secondary groups, if available
|
||||
* Use windows exe semantics on cygwin & msys
|
||||
* cwd should be first in path on win32, not last
|
||||
* Handle lower-case 'env.Path' on Windows
|
||||
* Update docs
|
||||
* use single-quotes
|
||||
|
||||
## v1.1.0
|
||||
|
||||
* Add tests, depend on is-absolute
|
||||
|
||||
## v1.0.9
|
||||
|
||||
* which.js: root is allowed to execute files owned by anyone
|
||||
|
||||
## v1.0.8
|
||||
|
||||
* don't use graceful-fs
|
||||
|
||||
## v1.0.7
|
||||
|
||||
* add license to package.json
|
||||
|
||||
## v1.0.6
|
||||
|
||||
* isc license
|
||||
|
||||
## 1.0.5
|
||||
|
||||
* Awful typo
|
||||
|
||||
## 1.0.4
|
||||
|
||||
* Test for path absoluteness properly
|
||||
* win: Allow '' as a pathext if cmd has a . in it
|
||||
|
||||
## 1.0.3
|
||||
|
||||
* Remove references to execPath
|
||||
* Make `which.sync()` work on Windows by honoring the PATHEXT variable.
|
||||
* Make `isExe()` always return true on Windows.
|
||||
* MIT
|
||||
|
||||
## 1.0.2
|
||||
|
||||
* Only files can be exes
|
||||
|
||||
## 1.0.1
|
||||
|
||||
* Respect the PATHEXT env for win32 support
|
||||
* should 0755 the bin
|
||||
* binary
|
||||
* guts
|
||||
* package
|
||||
* 1st
|
15
node_modules/global-prefix/node_modules/which/LICENSE
generated
vendored
Normal file
15
node_modules/global-prefix/node_modules/which/LICENSE
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and 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.
|
51
node_modules/global-prefix/node_modules/which/README.md
generated
vendored
Normal file
51
node_modules/global-prefix/node_modules/which/README.md
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
# which
|
||||
|
||||
Like the unix `which` utility.
|
||||
|
||||
Finds the first instance of a specified executable in the PATH
|
||||
environment variable. Does not cache the results, so `hash -r` is not
|
||||
needed when the PATH changes.
|
||||
|
||||
## USAGE
|
||||
|
||||
```javascript
|
||||
var which = require('which')
|
||||
|
||||
// async usage
|
||||
which('node', function (er, resolvedPath) {
|
||||
// er is returned if no "node" is found on the PATH
|
||||
// if it is found, then the absolute path to the exec is returned
|
||||
})
|
||||
|
||||
// sync usage
|
||||
// throws if not found
|
||||
var resolved = which.sync('node')
|
||||
|
||||
// if nothrow option is used, returns null if not found
|
||||
resolved = which.sync('node', {nothrow: true})
|
||||
|
||||
// Pass options to override the PATH and PATHEXT environment vars.
|
||||
which('node', { path: someOtherPath }, function (er, resolved) {
|
||||
if (er)
|
||||
throw er
|
||||
console.log('found at %j', resolved)
|
||||
})
|
||||
```
|
||||
|
||||
## CLI USAGE
|
||||
|
||||
Same as the BSD `which(1)` binary.
|
||||
|
||||
```
|
||||
usage: which [-as] program ...
|
||||
```
|
||||
|
||||
## OPTIONS
|
||||
|
||||
You may pass an options object as the second argument.
|
||||
|
||||
- `path`: Use instead of the `PATH` environment variable.
|
||||
- `pathExt`: Use instead of the `PATHEXT` environment variable.
|
||||
- `all`: Return all matches, instead of just the first one. Note that
|
||||
this means the function returns an array of strings instead of a
|
||||
single string.
|
52
node_modules/global-prefix/node_modules/which/bin/which
generated
vendored
Executable file
52
node_modules/global-prefix/node_modules/which/bin/which
generated
vendored
Executable file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env node
|
||||
var which = require("../")
|
||||
if (process.argv.length < 3)
|
||||
usage()
|
||||
|
||||
function usage () {
|
||||
console.error('usage: which [-as] program ...')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
var all = false
|
||||
var silent = false
|
||||
var dashdash = false
|
||||
var args = process.argv.slice(2).filter(function (arg) {
|
||||
if (dashdash || !/^-/.test(arg))
|
||||
return true
|
||||
|
||||
if (arg === '--') {
|
||||
dashdash = true
|
||||
return false
|
||||
}
|
||||
|
||||
var flags = arg.substr(1).split('')
|
||||
for (var f = 0; f < flags.length; f++) {
|
||||
var flag = flags[f]
|
||||
switch (flag) {
|
||||
case 's':
|
||||
silent = true
|
||||
break
|
||||
case 'a':
|
||||
all = true
|
||||
break
|
||||
default:
|
||||
console.error('which: illegal option -- ' + flag)
|
||||
usage()
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
process.exit(args.reduce(function (pv, current) {
|
||||
try {
|
||||
var f = which.sync(current, { all: all })
|
||||
if (all)
|
||||
f = f.join('\n')
|
||||
if (!silent)
|
||||
console.log(f)
|
||||
return pv;
|
||||
} catch (e) {
|
||||
return 1;
|
||||
}
|
||||
}, 0))
|
30
node_modules/global-prefix/node_modules/which/package.json
generated
vendored
Normal file
30
node_modules/global-prefix/node_modules/which/package.json
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
|
||||
"name": "which",
|
||||
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
|
||||
"version": "1.3.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/node-which.git"
|
||||
},
|
||||
"main": "which.js",
|
||||
"bin": "./bin/which",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"isexe": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mkdirp": "^0.5.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"tap": "^12.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js --cov",
|
||||
"changelog": "bash gen-changelog.sh",
|
||||
"postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}"
|
||||
},
|
||||
"files": [
|
||||
"which.js",
|
||||
"bin/which"
|
||||
]
|
||||
}
|
135
node_modules/global-prefix/node_modules/which/which.js
generated
vendored
Normal file
135
node_modules/global-prefix/node_modules/which/which.js
generated
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
module.exports = which
|
||||
which.sync = whichSync
|
||||
|
||||
var isWindows = process.platform === 'win32' ||
|
||||
process.env.OSTYPE === 'cygwin' ||
|
||||
process.env.OSTYPE === 'msys'
|
||||
|
||||
var path = require('path')
|
||||
var COLON = isWindows ? ';' : ':'
|
||||
var isexe = require('isexe')
|
||||
|
||||
function getNotFoundError (cmd) {
|
||||
var er = new Error('not found: ' + cmd)
|
||||
er.code = 'ENOENT'
|
||||
|
||||
return er
|
||||
}
|
||||
|
||||
function getPathInfo (cmd, opt) {
|
||||
var colon = opt.colon || COLON
|
||||
var pathEnv = opt.path || process.env.PATH || ''
|
||||
var pathExt = ['']
|
||||
|
||||
pathEnv = pathEnv.split(colon)
|
||||
|
||||
var pathExtExe = ''
|
||||
if (isWindows) {
|
||||
pathEnv.unshift(process.cwd())
|
||||
pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
|
||||
pathExt = pathExtExe.split(colon)
|
||||
|
||||
|
||||
// Always test the cmd itself first. isexe will check to make sure
|
||||
// it's found in the pathExt set.
|
||||
if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
|
||||
pathExt.unshift('')
|
||||
}
|
||||
|
||||
// If it has a slash, then we don't bother searching the pathenv.
|
||||
// just check the file itself, and that's it.
|
||||
if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
|
||||
pathEnv = ['']
|
||||
|
||||
return {
|
||||
env: pathEnv,
|
||||
ext: pathExt,
|
||||
extExe: pathExtExe
|
||||
}
|
||||
}
|
||||
|
||||
function which (cmd, opt, cb) {
|
||||
if (typeof opt === 'function') {
|
||||
cb = opt
|
||||
opt = {}
|
||||
}
|
||||
|
||||
var info = getPathInfo(cmd, opt)
|
||||
var pathEnv = info.env
|
||||
var pathExt = info.ext
|
||||
var pathExtExe = info.extExe
|
||||
var found = []
|
||||
|
||||
;(function F (i, l) {
|
||||
if (i === l) {
|
||||
if (opt.all && found.length)
|
||||
return cb(null, found)
|
||||
else
|
||||
return cb(getNotFoundError(cmd))
|
||||
}
|
||||
|
||||
var pathPart = pathEnv[i]
|
||||
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
|
||||
pathPart = pathPart.slice(1, -1)
|
||||
|
||||
var p = path.join(pathPart, cmd)
|
||||
if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
|
||||
p = cmd.slice(0, 2) + p
|
||||
}
|
||||
;(function E (ii, ll) {
|
||||
if (ii === ll) return F(i + 1, l)
|
||||
var ext = pathExt[ii]
|
||||
isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
|
||||
if (!er && is) {
|
||||
if (opt.all)
|
||||
found.push(p + ext)
|
||||
else
|
||||
return cb(null, p + ext)
|
||||
}
|
||||
return E(ii + 1, ll)
|
||||
})
|
||||
})(0, pathExt.length)
|
||||
})(0, pathEnv.length)
|
||||
}
|
||||
|
||||
function whichSync (cmd, opt) {
|
||||
opt = opt || {}
|
||||
|
||||
var info = getPathInfo(cmd, opt)
|
||||
var pathEnv = info.env
|
||||
var pathExt = info.ext
|
||||
var pathExtExe = info.extExe
|
||||
var found = []
|
||||
|
||||
for (var i = 0, l = pathEnv.length; i < l; i ++) {
|
||||
var pathPart = pathEnv[i]
|
||||
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
|
||||
pathPart = pathPart.slice(1, -1)
|
||||
|
||||
var p = path.join(pathPart, cmd)
|
||||
if (!pathPart && /^\.[\\\/]/.test(cmd)) {
|
||||
p = cmd.slice(0, 2) + p
|
||||
}
|
||||
for (var j = 0, ll = pathExt.length; j < ll; j ++) {
|
||||
var cur = p + pathExt[j]
|
||||
var is
|
||||
try {
|
||||
is = isexe.sync(cur, { pathExt: pathExtExe })
|
||||
if (is) {
|
||||
if (opt.all)
|
||||
found.push(cur)
|
||||
else
|
||||
return cur
|
||||
}
|
||||
} catch (ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (opt.all && found.length)
|
||||
return found
|
||||
|
||||
if (opt.nothrow)
|
||||
return null
|
||||
|
||||
throw getNotFoundError(cmd)
|
||||
}
|
75
node_modules/global-prefix/package.json
generated
vendored
Normal file
75
node_modules/global-prefix/package.json
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "global-prefix",
|
||||
"description": "Get the npm global path prefix.",
|
||||
"version": "1.0.2",
|
||||
"homepage": "https://github.com/jonschlinkert/global-prefix",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Alexandr Bogachev (https://github.com/rmbaad)",
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Charlike Mike Reagent (https://i.am.charlike.online)",
|
||||
"JasonChang (https://packagist.org/packages/jason-chang)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Jorrit Schippers (https://www.ncode.nl)",
|
||||
"Mathias Rasmussen (chrome://dino)",
|
||||
"Ross Fenning (http://rossfenning.co.uk)"
|
||||
],
|
||||
"repository": "jonschlinkert/global-prefix",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/global-prefix/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"expand-tilde": "^2.0.2",
|
||||
"homedir-polyfill": "^1.0.1",
|
||||
"ini": "^1.3.4",
|
||||
"is-windows": "^1.0.1",
|
||||
"which": "^1.2.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"mocha": "^3.4.2"
|
||||
},
|
||||
"keywords": [
|
||||
"global",
|
||||
"module",
|
||||
"modules",
|
||||
"npm",
|
||||
"path",
|
||||
"prefix",
|
||||
"resolve"
|
||||
],
|
||||
"verb": {
|
||||
"run": true,
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"global-modules",
|
||||
"global-paths"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user