New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

build-bin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-bin

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

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

build-bin

Build Status

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

Installing

build-bin is available as an npm package.

Usage

Add build-bin to the package.json as follows:

{
  "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:

npm run build

Plugins

  • build-html compiles and minifies an HTML entry point.
  • build-esnext compiles, concatenates, and minifies ES.next modules.
  • build-gzip gzips all static assets after compilation.
  • build-cloudfoundry configures a static frontend for deployment on Cloud Foundry.
  • 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.

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

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

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:

npm install

Run tests with:

npm test

Keywords

FAQs

Package last updated on 26 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc