Giter Club home page Giter Club logo

bin-build's Introduction

bin-build Build Status

Easily build binaries

Install

$ npm install --save bin-build

Usage

const binBuild = require('bin-build');

binBuild.url('http://www.lcdf.org/gifsicle/gifsicle-1.80.tar.gz', [
	'./configure --disable-gifview --disable-gifdiff',
	'make install'
]).then(() => {
	console.log('gifsicle built successfully');
});

binBuild.file('gifsicle-1.80.tar.gz', [
	'./configure --disable-gifview --disable-gifdiff',
	'make install'
]).then(() => {
	console.log('gifsicle built successfully');
});

API

binBuild.directory(directory, commands)

directory

Type: string

Path to a directory containing the source code.

commands

Type: Array

Commands to run when building.

binBuild.file(file, commands, [options])

file

Type: string

Path to a archive file containing the source code.

commands

Type: Array

Commands to run when building.

options

Type: Object

strip

Type: number
Default: 1

Strip a number of leading paths from file names on extraction.

binBuild.url(url, commands, [options])

url

Type: string

URL to a archive file containing the source code.

commands

Type: Array

Commands to run when building.

options

Type: Object

strip

Type: number
Default: 1

Strip a number of leading paths from file names on extraction.

License

MIT © Kevin Mårtensson

bin-build's People

Contributors

arthurvr avatar bbbco avatar kevva avatar shinnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bin-build's Issues

Bump version on npm for latest changes

I think a version bump is needed, specifically for this change: 9e92af2

Current version of bin-build is 2.2.0 which now has this dependency download@^4.4.3 (if you install it from npm now). It should be download@^5.0.2.

Cheers.

Out of date dependencies

Please update dependencies decompress and download to latest version because they require gulp-util which is depreciated.

Thanks!

Improve error messages

Like discussed in imagemin/imagemin#32, we should improve error messages to include instructions on what dependencies are needed for builds to succeed.

I've been thinking about introducing a .dependency(dep, os) method which collects the dependencies and if the build fails it writes a error message and lists the dependencies needed.

@sindresorhus, wdyt?

Remove gulp-util

I'm using your plugin in a personal project. But it have some warnings with gulp-util. Can you follow this recomendations to remove that?

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

vulnerability error

Hi, there are multiple vulnerabilities with some widely-used versions of your package.
Can they be addressed and back-ported?

npx: installed 115 in 9.19s
(+) 1 vulnerability found
┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Memory Exposure                                                    │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ tunnel-agent                                                       │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 5 (Medium)                                                         │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.4.3                                                              │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ <0.6.0                                                             │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ >=0.6.0                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ [email protected] > [email protected] >              │
│            │ [email protected] > [email protected] > [email protected] >     │
│            │ [email protected] > [email protected] > [email protected]                    │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/598                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Prototype Pollution                                                │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ deep-extend                                                        │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 2 (Low)                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.5.1                                                              │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ <6.5.2                                                             │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ >=6.5.2                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ [email protected] > [email protected] >                      │
│            │ [email protected] > [email protected] >           │
│            │ [email protected] > [email protected] > [email protected] > [email protected] > │
│            │ [email protected] > [email protected] > [email protected]                     │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/594                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Prototype Pollution                                                │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ deep-extend                                                        │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 2 (Low)                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.5.1                                                              │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ All                                                                │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ None                                                               ���
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ [email protected] > [email protected] >                      │
│            │ [email protected] > [email protected] >           │
│            │ [email protected] > [email protected] > [email protected] > [email protected] > │
│            │ [email protected] > [email protected] > [email protected]                     │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/612                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Prototype Pollution                                                │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ deep-extend                                                        │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 2 (Low)                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.5.1                                                              │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ <1.0.1                                                             │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ >=1.0.1                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ [email protected] > [email protected] >                      │
│            │ [email protected] > [email protected] >           │
│            │ [email protected] > [email protected] > [email protected] > [email protected] > │
│            │ [email protected] > [email protected] > [email protected]                     │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/611                             │
└────────────┴─���──────────────────────────────────────────────────────────────────┘

┌────────────┬────────────────────────────────────────────────────────────────────┐
│            │ Memory Exposure                                                    │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Name       │ tunnel-agent                                                       │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ CVSS       │ 5 (Medium)                                                         │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Installed  │ 0.4.3                                                              │
├─────���──────┼────────────────────────────────────────────────────────────────────┤
│ Vulnerable │ <0.6.0                                                             │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Patched    │ >=0.6.0                                                            │
├────────────┼────────────────────────────────────────────────────────────────────┤
│ Path       │ [email protected] > [email protected] >                      │
│            │ [email protected] > [email protected] >           │
│            │ [email protected] > [email protected] > [email protected] > [email protected] > │
│            │ [email protected]                                                 │
├────────────┼───────────────────────────���────────────────────────────────────────┤
│ More Info  │ https://nodesecurity.io/advisories/598                             │
└────────────┴────────────────────────────────────────────────────────────────────┘

Related: wemake-services/nuxt-imagemin#2
Related: Klathmon/imagemin-webpack-plugin#60
Related: imagemin/optipng-bin#98

Remove decompressed file after build

Would it be possible, in case of binBuild.url and binBuild.file to remove temp dir after all operations are done?

I'm trying to package a AWS Lambda function, which uses cwebp-bin library, and the difference between removing or not this temp directory is ~15MB final ZIP size. And in this case, the smaller the ZIP is, the better.

Thanks!

GitHub repo does not match NPM package

I've noticed that the README, tests and index.js file in this repo are outdated and do not match the latest code in the NPM package. Oddly enough, the NPM package.json is outdated (despite having the correct version number) and the GitHub repo has the correct deps/devDeps...

Request to remove gulp-util using the following API replacements

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.