Skip to content

Commit 71c3708

Browse files
committed
Tweaks
1 parent 5fb31c4 commit 71c3708

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ insert_final_newline = true
1010
[*.{json,yml}]
1111
indent_size = 2
1212
indent_style = space
13-
14-
[*.md]
15-
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* text=auto
2+
*.js text eol=lf

readme.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ $ npm install --save bin-wrapper
1313
## Usage
1414

1515
```js
16-
var BinWrapper = require('bin-wrapper');
16+
const BinWrapper = require('bin-wrapper');
1717

18-
var base = 'https://github.com/imagemin/gifsicle-bin/raw/master/vendor';
19-
var bin = new BinWrapper()
18+
const base = 'https://github.com/imagemin/gifsicle-bin/raw/master/vendor';
19+
const bin = new BinWrapper()
2020
.src(base + '/osx/gifsicle', 'darwin')
2121
.src(base + '/linux/x64/gifsicle', 'linux', 'x64')
2222
.src(base + '/win/x64/gifsicle.exe', 'win32', 'x64')
2323
.dest(path.join('vendor'))
2424
.use(process.platform === 'win32' ? 'gifsicle.exe' : 'gifsicle')
2525
.version('>=1.71');
2626

27-
bin.run(['--version'], function (err) {
27+
bin.run(['--version'], err => {
2828
console.log('gifsicle is working');
2929
});
3030
```
@@ -42,16 +42,18 @@ console.log(bin.path()); // => path/to/vendor/gifsicle
4242

4343
Creates a new `BinWrapper` instance.
4444

45-
#### options.skipCheck
45+
#### options
4646

47-
Type: `boolean`
47+
##### skipCheck
48+
49+
Type: `boolean`<br>
4850
Default: `false`
4951

5052
Whether to skip the binary check or not.
5153

52-
#### options.strip
54+
##### strip
5355

54-
Type: `number`
56+
Type: `number`<br>
5557
Default: `1`
5658

5759
Strip a number of leading paths from file names on extraction.
@@ -78,17 +80,17 @@ Type: `string`
7880

7981
Tie the source to a specific arch.
8082

81-
### .dest(dest)
83+
### .dest(destination)
8284

83-
#### dest
85+
#### destination
8486

8587
Type: `string`
8688

8789
Accepts a path which the files will be downloaded to.
8890

89-
### .use(bin)
91+
### .use(binary)
9092

91-
#### bin
93+
#### binary
9294

9395
Type: `string`
9496

@@ -104,25 +106,25 @@ Returns the full path to your binary.
104106

105107
Type: `string`
106108

107-
Define a [semver range](https://github.com/isaacs/node-semver#ranges) to check
109+
Define a [semver range](https://github.com/isaacs/node-semver#ranges) to check
108110
the binary against.
109111

110-
### .run([cmd], callback)
112+
### .run([arguments], callback)
111113

112-
Runs the search for the binary. If no binary is found it will download the file
114+
Runs the search for the binary. If no binary is found it will download the file
113115
using the URL provided in `.src()`.
114116

115-
#### cmd
117+
#### arguments
116118

117-
Type: `array`
119+
Type: `Array`<br>
118120
Default: `['--version']`
119121

120-
Command to run the binary with. If it exits with code `0` it means that the
122+
Command to run the binary with. If it exits with code `0` it means that the
121123
binary is working.
122124

123125
#### callback(err)
124126

125-
Type: `function`
127+
Type: `Function`
126128

127129
Returns nothing but a possible error.
128130

0 commit comments

Comments
 (0)