mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-09-06 23:17:22 +00:00
push all website files
This commit is contained in:
16
website/node_modules/npm/node_modules/cmd-shim/.npmignore
generated
vendored
Normal file
16
website/node_modules/npm/node_modules/cmd-shim/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
npm-debug.log
|
||||
|
||||
node_modules
|
4
website/node_modules/npm/node_modules/cmd-shim/.travis.yml
generated
vendored
Normal file
4
website/node_modules/npm/node_modules/cmd-shim/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.8"
|
27
website/node_modules/npm/node_modules/cmd-shim/LICENSE
generated
vendored
Normal file
27
website/node_modules/npm/node_modules/cmd-shim/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright (c) Isaac Z. Schlueter ("Author")
|
||||
All rights reserved.
|
||||
|
||||
The BSD License
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
44
website/node_modules/npm/node_modules/cmd-shim/README.md
generated
vendored
Normal file
44
website/node_modules/npm/node_modules/cmd-shim/README.md
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# cmd-shim
|
||||
|
||||
The cmd-shim used in npm to create executable scripts on Windows,
|
||||
since symlinks are not suitable for this purpose there.
|
||||
|
||||
On Unix systems, you should use a symbolic link instead.
|
||||
|
||||
[](https://travis-ci.org/ForbesLindesay/cmd-shim)
|
||||
[](https://david-dm.org/ForbesLindesay/cmd-shim)
|
||||
[](https://www.npmjs.com/package/cmd-shim)
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install cmd-shim
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### cmdShim(from, to, cb)
|
||||
|
||||
Create a cmd shim at `to` for the command line program at `from`.
|
||||
e.g.
|
||||
|
||||
```javascript
|
||||
var cmdShim = require('cmd-shim');
|
||||
cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {
|
||||
if (err) throw err;
|
||||
});
|
||||
```
|
||||
|
||||
### cmdShim.ifExists(from, to, cb)
|
||||
|
||||
The same as above, but will just continue if the file does not exist.
|
||||
Source:
|
||||
|
||||
```javascript
|
||||
function cmdShimIfExists (from, to, cb) {
|
||||
fs.stat(from, function (er) {
|
||||
if (er) return cb()
|
||||
cmdShim(from, to, cb)
|
||||
})
|
||||
}
|
||||
```
|
180
website/node_modules/npm/node_modules/cmd-shim/index.js
generated
vendored
Normal file
180
website/node_modules/npm/node_modules/cmd-shim/index.js
generated
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
// On windows, create a .cmd file.
|
||||
// Read the #! in the file to see what it uses. The vast majority
|
||||
// of the time, this will be either:
|
||||
// "#!/usr/bin/env <prog> <args...>"
|
||||
// or:
|
||||
// "#!<prog> <args...>"
|
||||
//
|
||||
// Write a binroot/pkg.bin + ".cmd" file that has this line in it:
|
||||
// @<prog> <args...> %~dp0<target> %*
|
||||
|
||||
module.exports = cmdShim
|
||||
cmdShim.ifExists = cmdShimIfExists
|
||||
|
||||
var fs = require("graceful-fs")
|
||||
|
||||
var mkdir = require("mkdirp")
|
||||
, path = require("path")
|
||||
, shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/
|
||||
|
||||
function cmdShimIfExists (from, to, cb) {
|
||||
fs.stat(from, function (er) {
|
||||
if (er) return cb()
|
||||
cmdShim(from, to, cb)
|
||||
})
|
||||
}
|
||||
|
||||
// Try to unlink, but ignore errors.
|
||||
// Any problems will surface later.
|
||||
function rm (path, cb) {
|
||||
fs.unlink(path, function(er) {
|
||||
cb()
|
||||
})
|
||||
}
|
||||
|
||||
function cmdShim (from, to, cb) {
|
||||
fs.stat(from, function (er, stat) {
|
||||
if (er)
|
||||
return cb(er)
|
||||
|
||||
cmdShim_(from, to, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function cmdShim_ (from, to, cb) {
|
||||
var then = times(2, next, cb)
|
||||
rm(to, then)
|
||||
rm(to + ".cmd", then)
|
||||
|
||||
function next(er) {
|
||||
writeShim(from, to, cb)
|
||||
}
|
||||
}
|
||||
|
||||
function writeShim (from, to, cb) {
|
||||
// make a cmd file and a sh script
|
||||
// First, check if the bin is a #! of some sort.
|
||||
// If not, then assume it's something that'll be compiled, or some other
|
||||
// sort of script, and just call it directly.
|
||||
mkdir(path.dirname(to), function (er) {
|
||||
if (er)
|
||||
return cb(er)
|
||||
fs.readFile(from, "utf8", function (er, data) {
|
||||
if (er) return writeShim_(from, to, null, null, cb)
|
||||
var firstLine = data.trim().split(/\r*\n/)[0]
|
||||
, shebang = firstLine.match(shebangExpr)
|
||||
if (!shebang) return writeShim_(from, to, null, null, cb)
|
||||
var prog = shebang[1]
|
||||
, args = shebang[2] || ""
|
||||
return writeShim_(from, to, prog, args, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function writeShim_ (from, to, prog, args, cb) {
|
||||
var shTarget = path.relative(path.dirname(to), from)
|
||||
, target = shTarget.split("/").join("\\")
|
||||
, longProg
|
||||
, shProg = prog && prog.split("\\").join("/")
|
||||
, shLongProg
|
||||
shTarget = shTarget.split("\\").join("/")
|
||||
args = args || ""
|
||||
if (!prog) {
|
||||
prog = "\"%~dp0\\" + target + "\""
|
||||
shProg = "\"$basedir/" + shTarget + "\""
|
||||
args = ""
|
||||
target = ""
|
||||
shTarget = ""
|
||||
} else {
|
||||
longProg = "\"%~dp0\\" + prog + ".exe\""
|
||||
shLongProg = "\"$basedir/" + prog + "\""
|
||||
target = "\"%~dp0\\" + target + "\""
|
||||
shTarget = "\"$basedir/" + shTarget + "\""
|
||||
}
|
||||
|
||||
// @IF EXIST "%~dp0\node.exe" (
|
||||
// "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
|
||||
// ) ELSE (
|
||||
// SETLOCAL
|
||||
// SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
// node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %*
|
||||
// )
|
||||
var cmd
|
||||
if (longProg) {
|
||||
cmd = "@IF EXIST " + longProg + " (\r\n"
|
||||
+ " " + longProg + " " + args + " " + target + " %*\r\n"
|
||||
+ ") ELSE (\r\n"
|
||||
+ " @SETLOCAL\r\n"
|
||||
+ " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n"
|
||||
+ " " + prog + " " + args + " " + target + " %*\r\n"
|
||||
+ ")"
|
||||
} else {
|
||||
cmd = "@" + prog + " " + args + " " + target + " %*\r\n"
|
||||
}
|
||||
|
||||
// #!/bin/sh
|
||||
// basedir=`dirname "$0"`
|
||||
//
|
||||
// case `uname` in
|
||||
// *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
// esac
|
||||
//
|
||||
// if [ -x "$basedir/node.exe" ]; then
|
||||
// "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
|
||||
// ret=$?
|
||||
// else
|
||||
// node "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
|
||||
// ret=$?
|
||||
// fi
|
||||
// exit $ret
|
||||
|
||||
var sh = "#!/bin/sh\n"
|
||||
|
||||
if (shLongProg) {
|
||||
sh = sh
|
||||
+ "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n"
|
||||
+ "\n"
|
||||
+ "case `uname` in\n"
|
||||
+ " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n"
|
||||
+ "esac\n"
|
||||
+ "\n"
|
||||
|
||||
sh = sh
|
||||
+ "if [ -x "+shLongProg+" ]; then\n"
|
||||
+ " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n"
|
||||
+ " ret=$?\n"
|
||||
+ "else \n"
|
||||
+ " " + shProg + " " + args + " " + shTarget + " \"$@\"\n"
|
||||
+ " ret=$?\n"
|
||||
+ "fi\n"
|
||||
+ "exit $ret\n"
|
||||
} else {
|
||||
sh = shProg + " " + args + " " + shTarget + " \"$@\"\n"
|
||||
+ "exit $?\n"
|
||||
}
|
||||
|
||||
var then = times(2, next, cb)
|
||||
fs.writeFile(to + ".cmd", cmd, "utf8", then)
|
||||
fs.writeFile(to, sh, "utf8", then)
|
||||
function next () {
|
||||
chmodShim(to, cb)
|
||||
}
|
||||
}
|
||||
|
||||
function chmodShim (to, cb) {
|
||||
var then = times(2, cb, cb)
|
||||
fs.chmod(to, 0755, then)
|
||||
fs.chmod(to + ".cmd", 0755, then)
|
||||
}
|
||||
|
||||
function times(n, ok, cb) {
|
||||
var errState = null
|
||||
return function(er) {
|
||||
if (!errState) {
|
||||
if (er)
|
||||
cb(errState = er)
|
||||
else if (--n === 0)
|
||||
ok()
|
||||
}
|
||||
}
|
||||
}
|
54
website/node_modules/npm/node_modules/cmd-shim/package.json
generated
vendored
Normal file
54
website/node_modules/npm/node_modules/cmd-shim/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"cmd-shim@2.0.2",
|
||||
"/Users/rebecca/code/npm"
|
||||
]
|
||||
],
|
||||
"_from": "cmd-shim@2.0.2",
|
||||
"_id": "cmd-shim@2.0.2",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=",
|
||||
"_location": "/npm/cmd-shim",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "cmd-shim@2.0.2",
|
||||
"name": "cmd-shim",
|
||||
"escapedName": "cmd-shim",
|
||||
"rawSpec": "2.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/npm",
|
||||
"/npm/bin-links"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz",
|
||||
"_spec": "2.0.2",
|
||||
"_where": "/Users/rebecca/code/npm",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ForbesLindesay/cmd-shim/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"mkdirp": "~0.5.0"
|
||||
},
|
||||
"description": "Used in npm for command line application support",
|
||||
"devDependencies": {
|
||||
"rimraf": "~2.2.8",
|
||||
"tap": "~0.4.11"
|
||||
},
|
||||
"homepage": "https://github.com/ForbesLindesay/cmd-shim#readme",
|
||||
"license": "BSD-2-Clause",
|
||||
"name": "cmd-shim",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ForbesLindesay/cmd-shim.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "2.0.2"
|
||||
}
|
34
website/node_modules/npm/node_modules/cmd-shim/test/00-setup.js
generated
vendored
Normal file
34
website/node_modules/npm/node_modules/cmd-shim/test/00-setup.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
var test = require('tap').test
|
||||
var mkdirp = require('mkdirp')
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var fixtures = path.resolve(__dirname, 'fixtures')
|
||||
|
||||
var froms = {
|
||||
'from.exe': 'exe',
|
||||
'from.env': '#!/usr/bin/env node\nconsole.log(/hi/)\n',
|
||||
'from.env.args': '#!/usr/bin/env node --expose_gc\ngc()\n',
|
||||
'from.sh': '#!/usr/bin/sh\necho hi\n',
|
||||
'from.sh.args': '#!/usr/bin/sh -x\necho hi\n'
|
||||
}
|
||||
|
||||
var cmdShim = require('../')
|
||||
|
||||
test('create fixture', function (t) {
|
||||
mkdirp(fixtures, function (er) {
|
||||
if (er)
|
||||
throw er
|
||||
t.pass('made dir')
|
||||
Object.keys(froms).forEach(function (f) {
|
||||
t.test('write ' + f, function (t) {
|
||||
fs.writeFile(path.resolve(fixtures, f), froms[f], function (er) {
|
||||
if (er)
|
||||
throw er
|
||||
t.pass('wrote ' + f)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
})
|
175
website/node_modules/npm/node_modules/cmd-shim/test/basic.js
generated
vendored
Normal file
175
website/node_modules/npm/node_modules/cmd-shim/test/basic.js
generated
vendored
Normal file
@@ -0,0 +1,175 @@
|
||||
var test = require('tap').test
|
||||
var mkdirp = require('mkdirp')
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var fixtures = path.resolve(__dirname, 'fixtures')
|
||||
|
||||
var cmdShim = require('../')
|
||||
|
||||
test('no shebang', function (t) {
|
||||
var from = path.resolve(fixtures, 'from.exe')
|
||||
var to = path.resolve(fixtures, 'exe.shim')
|
||||
cmdShim(from, to, function(er) {
|
||||
if (er)
|
||||
throw er
|
||||
t.equal(fs.readFileSync(to, 'utf8'),
|
||||
"\"$basedir/from.exe\" \"$@\"\nexit $?\n")
|
||||
t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
|
||||
"@\"%~dp0\\from.exe\" %*\r\n")
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
test('env shebang', function (t) {
|
||||
var from = path.resolve(fixtures, 'from.env')
|
||||
var to = path.resolve(fixtures, 'env.shim')
|
||||
cmdShim(from, to, function(er) {
|
||||
if (er)
|
||||
throw er
|
||||
console.error('%j', fs.readFileSync(to, 'utf8'))
|
||||
console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
|
||||
|
||||
t.equal(fs.readFileSync(to, 'utf8'),
|
||||
"#!/bin/sh"+
|
||||
"\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")"+
|
||||
"\n"+
|
||||
"\ncase `uname` in"+
|
||||
"\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+
|
||||
"\nesac"+
|
||||
"\n"+
|
||||
"\nif [ -x \"$basedir/node\" ]; then"+
|
||||
"\n \"$basedir/node\" \"$basedir/from.env\" \"$@\""+
|
||||
"\n ret=$?"+
|
||||
"\nelse "+
|
||||
"\n node \"$basedir/from.env\" \"$@\""+
|
||||
"\n ret=$?"+
|
||||
"\nfi"+
|
||||
"\nexit $ret"+
|
||||
"\n")
|
||||
t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
|
||||
"@IF EXIST \"%~dp0\\node.exe\" (\r"+
|
||||
"\n \"%~dp0\\node.exe\" \"%~dp0\\from.env\" %*\r"+
|
||||
"\n) ELSE (\r"+
|
||||
"\n @SETLOCAL\r"+
|
||||
"\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+
|
||||
"\n node \"%~dp0\\from.env\" %*\r"+
|
||||
"\n)")
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
test('env shebang with args', function (t) {
|
||||
var from = path.resolve(fixtures, 'from.env.args')
|
||||
var to = path.resolve(fixtures, 'env.args.shim')
|
||||
cmdShim(from, to, function(er) {
|
||||
if (er)
|
||||
throw er
|
||||
console.error('%j', fs.readFileSync(to, 'utf8'))
|
||||
console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
|
||||
|
||||
t.equal(fs.readFileSync(to, 'utf8'),
|
||||
"#!/bin/sh"+
|
||||
"\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")"+
|
||||
"\n"+
|
||||
"\ncase `uname` in"+
|
||||
"\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+
|
||||
"\nesac"+
|
||||
"\n"+
|
||||
"\nif [ -x \"$basedir/node\" ]; then"+
|
||||
"\n \"$basedir/node\" --expose_gc \"$basedir/from.env.args\" \"$@\""+
|
||||
"\n ret=$?"+
|
||||
"\nelse "+
|
||||
"\n node --expose_gc \"$basedir/from.env.args\" \"$@\""+
|
||||
"\n ret=$?"+
|
||||
"\nfi"+
|
||||
"\nexit $ret"+
|
||||
"\n")
|
||||
t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
|
||||
"@IF EXIST \"%~dp0\\node.exe\" (\r"+
|
||||
"\n \"%~dp0\\node.exe\" --expose_gc \"%~dp0\\from.env.args\" %*\r"+
|
||||
"\n) ELSE (\r"+
|
||||
"\n @SETLOCAL\r"+
|
||||
"\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+
|
||||
"\n node --expose_gc \"%~dp0\\from.env.args\" %*\r"+
|
||||
"\n)")
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
test('explicit shebang', function (t) {
|
||||
var from = path.resolve(fixtures, 'from.sh')
|
||||
var to = path.resolve(fixtures, 'sh.shim')
|
||||
cmdShim(from, to, function(er) {
|
||||
if (er)
|
||||
throw er
|
||||
console.error('%j', fs.readFileSync(to, 'utf8'))
|
||||
console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
|
||||
|
||||
t.equal(fs.readFileSync(to, 'utf8'),
|
||||
"#!/bin/sh" +
|
||||
"\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")" +
|
||||
"\n" +
|
||||
"\ncase `uname` in" +
|
||||
"\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" +
|
||||
"\nesac" +
|
||||
"\n" +
|
||||
"\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +
|
||||
"\n \"$basedir//usr/bin/sh\" \"$basedir/from.sh\" \"$@\"" +
|
||||
"\n ret=$?" +
|
||||
"\nelse " +
|
||||
"\n /usr/bin/sh \"$basedir/from.sh\" \"$@\"" +
|
||||
"\n ret=$?" +
|
||||
"\nfi" +
|
||||
"\nexit $ret" +
|
||||
"\n")
|
||||
|
||||
t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
|
||||
"@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" +
|
||||
"\n \"%~dp0\\/usr/bin/sh.exe\" \"%~dp0\\from.sh\" %*\r" +
|
||||
"\n) ELSE (\r" +
|
||||
"\n @SETLOCAL\r"+
|
||||
"\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+
|
||||
"\n /usr/bin/sh \"%~dp0\\from.sh\" %*\r" +
|
||||
"\n)")
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
test('explicit shebang with args', function (t) {
|
||||
var from = path.resolve(fixtures, 'from.sh.args')
|
||||
var to = path.resolve(fixtures, 'sh.args.shim')
|
||||
cmdShim(from, to, function(er) {
|
||||
if (er)
|
||||
throw er
|
||||
console.error('%j', fs.readFileSync(to, 'utf8'))
|
||||
console.error('%j', fs.readFileSync(to + '.cmd', 'utf8'))
|
||||
|
||||
t.equal(fs.readFileSync(to, 'utf8'),
|
||||
"#!/bin/sh" +
|
||||
"\nbasedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")" +
|
||||
"\n" +
|
||||
"\ncase `uname` in" +
|
||||
"\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" +
|
||||
"\nesac" +
|
||||
"\n" +
|
||||
"\nif [ -x \"$basedir//usr/bin/sh\" ]; then" +
|
||||
"\n \"$basedir//usr/bin/sh\" -x \"$basedir/from.sh.args\" \"$@\"" +
|
||||
"\n ret=$?" +
|
||||
"\nelse " +
|
||||
"\n /usr/bin/sh -x \"$basedir/from.sh.args\" \"$@\"" +
|
||||
"\n ret=$?" +
|
||||
"\nfi" +
|
||||
"\nexit $ret" +
|
||||
"\n")
|
||||
|
||||
t.equal(fs.readFileSync(to + '.cmd', 'utf8'),
|
||||
"@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" +
|
||||
"\n \"%~dp0\\/usr/bin/sh.exe\" -x \"%~dp0\\from.sh.args\" %*\r" +
|
||||
"\n) ELSE (\r" +
|
||||
"\n @SETLOCAL\r"+
|
||||
"\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+
|
||||
"\n /usr/bin/sh -x \"%~dp0\\from.sh.args\" %*\r" +
|
||||
"\n)")
|
||||
t.end()
|
||||
})
|
||||
})
|
13
website/node_modules/npm/node_modules/cmd-shim/test/zz-cleanup.js
generated
vendored
Normal file
13
website/node_modules/npm/node_modules/cmd-shim/test/zz-cleanup.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
var test = require('tap').test
|
||||
var path = require('path')
|
||||
var fixtures = path.resolve(__dirname, 'fixtures')
|
||||
var rimraf = require('rimraf')
|
||||
|
||||
test('cleanup', function(t) {
|
||||
rimraf(fixtures, function(er) {
|
||||
if (er)
|
||||
throw er
|
||||
t.pass('cleaned up')
|
||||
t.end()
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user