-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
54 lines (54 loc) · 4 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "bin-wrapper",
"version": "0.2.4",
"description": "Binary wrapper that makes your programs seamlessly available as local dependencies",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/kevva/bin-wrapper"
},
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "https://github.com/kevva"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "mocha --reporter list --timeout 0"
},
"files": [
"index.js"
],
"keywords": [
"bin",
"build",
"make",
"wrapper"
],
"dependencies": {
"bin-check": "^0.1.0",
"download": "^0.1.2",
"executable": "^0.1.0",
"find-file": "^0.1.2",
"mout": "^0.9.1",
"rimraf": "^2.2.6",
"tempfile": "^0.1.2"
},
"devDependencies": {
"mocha": "^1.18.2"
},
"readme": "# bin-wrapper [![Build Status](https://travis-ci.org/kevva/bin-wrapper.svg?branch=master)](https://travis-ci.org/kevva/bin-wrapper)\n\n> Binary wrapper for Node.js that makes your programs seamlessly available as local dependencies\n\n## Install\n\n```bash\n$ npm install --save bin-wrapper\n```\n\n## Usage\n\n```js\nvar BinWrapper = require('bin-wrapper');\nvar bin = new BinWrapper({ bin: 'gifsicle', version: '1.71', dest: 'vendor' });\n\nbin\n .addUrl('https://raw.github.com/yeoman/node-gifsicle/0.1.4/vendor/osx/gifsicle', 'darwin')\n .addUrl('https://raw.github.com/yeoman/node-gifsicle/0.1.4/vendor/linux/x64/gifsicle', 'linux', 'x64')\n .addSource('http://www.lcdf.org/gifsicle/gifsicle-1.71.tar.gz')\n .check()\n .on('error', function (err) {\n console.log(err);\n });\n .on('fail', function () {\n this.build('./configure && make && make install')\n })\n .on('success', function () {\n console.log('gifsicle is working');\n })\n .on('finish', function () {\n console.log('gifsicle rebuilt successfully!')\n })\n```\n\nGet the path to your binary with `bin.path`:\n\n```js\nconsole.log(bin.path); // => path/to/vendor/gifsicle\n```\n\n## API\n\n### new BinWrapper(opts)\n\nCreates a new `BinWrapper`. Available options are `bin` which is the name of the\nbinary and `dest` which is where to download/build the binary to.\n\n### .check(cmd)\n\nCheck if a binary is present and working. If it isn't, download and test it by\nrunning the binary with `cmd` and see if it exits correctly.\n\nEmits `success` if the binary is working and `fail` if the binary failed to exit with\nstatus code `0`.\n\n### .build(cmd)\n\nDownload the source archive defined in the `src` property and build it using the\nbuild script defined in the `cmd` argument.\n\nEmits `finish` when build is finished successfully.\n\n### .addPath(src)\n\nAdd a path where to check for the binary. By default `dest` is added to paths.\n\n### .addUrl(url, platform, arch)\n\nAdd a URL to download the binary from. Use `platform` and `arch` to target a\nspecific system.\n\n### .addFile(url, platform, arch)\n\nAdd a file to download alongside with the binary. Use `platform` and `arch` to\ntarget a specific system.\n\n### .addSource(url)\n\nAdd a URL where to download the source code from.\n\n## Options\n\n### bin\n\nType: `String` \nDefault: `undefined`\n\nSet the name of the binary.\n\n### version\n\nType: `String` \nDefault: `undefined`\n\nDefine a specific version.\n\n### global\n\nType: `Boolean` \nDefault: `true`\n\nWhether to check for a binary globally or not.\n\n### dest\n\nType: `String` \nDefault: `process.cwd()`\n\nDestination to download/build binary.\n\n## License\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License) © [Kevin Mårtensson](http://kevinmartensson.com)\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/kevva/bin-wrapper/issues"
},
"homepage": "https://github.com/kevva/bin-wrapper",
"_id": "bin-wrapper@0.2.4",
"dist": {
"shasum": "40d09372b277ef76e57167e18f39ed2ad93b9800"
},
"_from": "bin-wrapper@~0.2.0",
"_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-0.2.4.tgz"
}