You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # bin-build [![Build Status](https://travis-ci.org/kevva/bin-build.svg?branch=master)](https://travis-ci.org/kevva/bin-build)
  2. > Easily build binaries
  3. ## Install
  4. ```
  5. $ npm install --save bin-build
  6. ```
  7. ## Usage
  8. ```js
  9. const binBuild = require('bin-build');
  10. binBuild.url('http://www.lcdf.org/gifsicle/gifsicle-1.80.tar.gz', [
  11. './configure --disable-gifview --disable-gifdiff',
  12. 'make install'
  13. ]).then(() => {
  14. console.log('gifsicle built successfully');
  15. });
  16. binBuild.file('gifsicle-1.80.tar.gz', [
  17. './configure --disable-gifview --disable-gifdiff',
  18. 'make install'
  19. ]).then(() => {
  20. console.log('gifsicle built successfully');
  21. });
  22. ```
  23. ## API
  24. ### binBuild.directory(directory, commands)
  25. #### directory
  26. Type: `string`
  27. Path to a directory containing the source code.
  28. #### commands
  29. Type: `Array`
  30. Commands to run when building.
  31. ### binBuild.file(file, commands, [options])
  32. #### file
  33. Type: `string`
  34. Path to a archive file containing the source code.
  35. #### commands
  36. Type: `Array`
  37. Commands to run when building.
  38. #### options
  39. Type: `Object`
  40. ##### strip
  41. Type: `number`<br>
  42. Default: `1`
  43. Strip a number of leading paths from file names on extraction.
  44. ### binBuild.url(url, commands, [options])
  45. #### url
  46. Type: `string`
  47. URL to a archive file containing the source code.
  48. #### commands
  49. Type: `Array`
  50. Commands to run when building.
  51. #### options
  52. Type: `Object`
  53. ##### strip
  54. Type: `number`<br>
  55. Default: `1`
  56. Strip a number of leading paths from file names on extraction.
  57. ## License
  58. MIT © [Kevin Mårtensson](https://github.com/kevva)