File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,23 @@ console.log(bin.path()); // => path/to/vendor/gifsicle
4141
4242### new BinWrapper(opts)
4343
44- Creates a new ` BinWrapper ` instance. The available options are:
44+ Creates a new ` BinWrapper ` instance.
4545
46- * ` skipCheck ` : Whether to skip checking if the binary works or not. Defaults to ` false ` .
47- * ` strip ` : Strip a number of leading paths from file names on extraction. Defaults to ` 1 ` .
46+ #### opts.skipCheck
4847
49- ### .src(url, os, arch)
48+ Type: ` Boolean `
49+ Default: ` false `
50+
51+ Whether to skip the binary check or not.
52+
53+ #### opts.strip
54+
55+ Type: ` Number `
56+ Default: ` 1 `
57+
58+ Strip a number of leading paths from file names on extraction.
59+
60+ ### .src(url, [ os] , [ arch] )
5061
5162Adds a source to download.
5263
@@ -70,35 +81,42 @@ Tie the source to a specific arch.
7081
7182### .dest(dest)
7283
84+ #### dest
85+
7386Type: ` String `
7487
7588Accepts a path which the files will be downloaded to.
7689
7790### .use(bin)
7891
92+ #### bin
93+
7994Type: ` String `
8095
8196Define which file to use as the binary.
8297
8398### .path()
8499
85- Get the full path to your binary.
100+ Returns the full path to your binary.
86101
87102### .version(range)
88103
104+ #### range
105+
89106Type: ` String `
90107
91108Define a [ semver range] ( https://github.com/isaacs/node-semver#ranges ) to check
92109the binary against.
93110
94- ### .run(cmd, cb)
111+ ### .run([ cmd] , cb)
95112
96113Runs the search for the binary. If no binary is found it will download the file
97114using the URL provided in ` .src() ` .
98115
99116#### cmd
100117
101- Type: ` Array `
118+ Type: ` Array `
119+ Default: ` ['--version'] `
102120
103121Command to run the binary with. If it exits with code ` 0 ` it means that the
104122binary is working.
You can’t perform that action at this time.
0 commit comments