@@ -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
4343Creates a new ` BinWrapper ` instance.
4444
45- #### options.skipCheck
45+ #### options
4646
47- Type: ` boolean `
47+ ##### skipCheck
48+
49+ Type: ` boolean ` <br >
4850Default: ` false `
4951
5052Whether to skip the binary check or not.
5153
52- #### options. strip
54+ ##### strip
5355
54- Type: ` number `
56+ Type: ` number ` < br >
5557Default: ` 1 `
5658
5759Strip a number of leading paths from file names on extraction.
@@ -78,17 +80,17 @@ Type: `string`
7880
7981Tie the source to a specific arch.
8082
81- ### .dest(dest )
83+ ### .dest(destination )
8284
83- #### dest
85+ #### destination
8486
8587Type: ` string `
8688
8789Accepts a path which the files will be downloaded to.
8890
89- ### .use(bin )
91+ ### .use(binary )
9092
91- #### bin
93+ #### binary
9294
9395Type: ` string `
9496
@@ -104,25 +106,25 @@ Returns the full path to your binary.
104106
105107Type: ` 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
108110the 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
113115using the URL provided in ` .src() ` .
114116
115- #### cmd
117+ #### arguments
116118
117- Type: ` array `
119+ Type: ` Array ` < br >
118120Default: ` ['--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
121123binary is working.
122124
123125#### callback(err)
124126
125- Type: ` function `
127+ Type: ` Function `
126128
127129Returns nothing but a possible error.
128130
0 commit comments