# build-bin

> A zero-configuration plugin system for building assets for production release

Latest version **0.0.8** (published 2016-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install build-bin
pnpm add build-bin
yarn add build-bin
bun add build-bin
```

Provides the command `build`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2016-08-26 |
| First published | 2016-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vinson Chuong |
| Maintainers | vinsonchuong |
| Keywords | assets, esnext, compile, production, minify |

## Links

- npm: https://www.npmjs.com/package/build-bin
- Repository: https://github.com/vinsonchuong/build-bin
- Issues: https://github.com/vinsonchuong/build-bin/issues
- npm.io page: https://npm.io/package/build-bin

## Dependencies (3)

- [esnext-async](https://npm.io/package/esnext-async.md) ^0.0.6
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.5
- [directory-helpers](https://npm.io/package/directory-helpers.md) ^0.1.3

## Recent versions

- 0.0.8 (latest) — 2016-08-26
- 0.0.7 — 2016-08-25
- 0.0.6 — 2016-08-10
- 0.0.5 — 2016-08-10
- 0.0.3 — 2016-08-06
- 0.0.2 — 2016-08-04
- 0.0.1 — 2016-08-04

## README

# build-bin
[![Build Status](https://travis-ci.org/vinsonchuong/build-bin.svg?branch=master)](https://travis-ci.org/vinsonchuong/build-bin)

A zero-configuration plugin system for building assets for production release

## Installing
`build-bin` is available as an
[npm package](https://www.npmjs.com/package/build-bin).

## Usage
Add `build-bin` to the `package.json` as follows:
```json
{
  "name": "project",
  "private": true,
  "scripts": {
    "build": "build"
  },
  "devDependencies": {
    "build-bin": "^0.0.2"
  }
}
```

Then add plugins for each desired build workflow. Existing plugins are listed
below.

From the command line, run:
```bash
npm run build
```

## Plugins
* [build-html](https://github.com/vinsonchuong/build-html) compiles and minifies
  an HTML entry point.
* [build-esnext](https://github.com/vinsonchuong/build-esnext) compiles,
  concatenates, and minifies ES.next modules.
* [build-gzip](https://github.com/vinsonchuong/build-gzip) gzips all static
  assets after compilation.
* [build-cloudfoundry](https://github.com/vinsonchuong/build-cloudfoundry)
  configures a static frontend for deployment on Cloud Foundry.
* [build-heroku](https://github.com/vinsonchuong/build-heroku)
  configures a static frontend for deployment on Heroku.

## Writing Plugins
Plugins must have a `name` that starts with `build-` and declare a `stage` in
`package.json`. Valid stages include `compile`, `compress`, and `config`. All
plugins from the `compile` stage are run first, followed by plugins in the
`compress` stage, and finally, followed by plugins in the `config` stage.

```json
{
  "name": "build-esnext",
  "stage": "compile",
  "main": "src/index.js"
}
```

Plugins must export a `function` or `async function` and must write into the
`dist` directory.

```js
import {fs} from 'node-promise-es6';

export default async function() {
  await fs.writeFile('dist.js', 'console.log("Hello World!");');
}
```

## Development
### Getting Started
The application requires the following external dependencies:
* Node.js

The rest of the dependencies are handled through:
```bash
npm install
```

Run tests with:
```bash
npm test
```

---
_Source: https://npm.io/package/build-bin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
