-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
35 lines (35 loc) · 2.37 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"name": "win-spawn",
"version": "2.0.0",
"description": "Spawn for node.js but in a way that works regardless of which OS you're using",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/ForbesLindesay/win-spawn.git"
},
"bin": {
"win-spawn": "./bin/win-spawn"
},
"devDependencies": {
"linify": "~1.0.1"
},
"scripts": {
"prepublish": "linify transform bin"
},
"author": {
"name": "ForbesLindesay"
},
"license": "BSD",
"readme": "# win-spawn\n\n Spawn for node.js but in a way that works regardless of which OS you're using. Use this if you want to use spawn with a JavaScript file. It works by explicitly invoking node on windows. It also shims support for environment variable setting by attempting to parse the command with a regex. Since all modification is wrapped in `if (os === 'Windows_NT')` it can be safely used on non-windows systems and will not break anything.\n\n## Installation\n\n $ npm install win-spawn\n\n## Usage\n\n### Command Line\n\n All the following will work exactly as if the 'win-spawn ' prefix was ommitted when on unix.\n\n $ win-spawn foo\n $ win-spawn ./bin/foo\n $ win-spawn NODE_PATH=./lib foo\n $ win-spawn NODE_PATH=./lib foo arg1 arg2\n\n You can also transform all the line endings in a directory from `\\r\\n` to `\\n` just by running:\n\n $ win-line-endings\n\n You can preview the changes by running:\n\n $ win-line-endings -p\n\n It will ignore `node_modules` and `.git` by default, but is not clever enough to recognise binary files yet.\n\n### API\n\nThis will just pass through to `child_process.spawn` on unix systems, but will correctly parse the arguments on windows.\n\n```javascript\nspawn('foo', [], {stdio: 'inherit'});\nspawn('./bin/foo', [], {stdio: 'inherit'});\nspawn('NODE_PATH=./lib foo', [], {stdio: 'inherit'});\nspawn('NODE_PATH=./lib foo', [arg1, arg2], {stdio: 'inherit'});\n```\n\n![viewcount](https://viewcount.jepso.com/count/ForbesLindesay/win-spawn.png)\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/ForbesLindesay/win-spawn/issues"
},
"homepage": "https://github.com/ForbesLindesay/win-spawn",
"_id": "win-spawn@2.0.0",
"dist": {
"shasum": "168554c82047378689069bb84b808e652a7954a4"
},
"_from": "win-spawn@^2.0.0",
"_resolved": "http://registry.npmjs.org/win-spawn/-/win-spawn-2.0.0.tgz"
}