# @skivvy/skivvy-package-browserify

> Compile JavaScript using Browserify

Latest version **0.1.4** (published 2015-08-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install @skivvy/skivvy-package-browserify
pnpm add @skivvy/skivvy-package-browserify
yarn add @skivvy/skivvy-package-browserify
bun add @skivvy/skivvy-package-browserify
```

## 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.1.4 |
| Published | 2015-08-31 |
| First published | 2015-05-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tim Kendrick |
| Maintainers | skivvy, timkendrick |
| Keywords | skivvy-package, browserify |

## Links

- npm: https://www.npmjs.com/package/@skivvy/skivvy-package-browserify
- Repository: https://github.com/skivvyjs/skivvy-package-browserify
- Homepage: https://github.com/skivvyjs/skivvy-package-browserify#readme
- Issues: https://github.com/skivvyjs/skivvy-package-browserify/issues
- npm.io page: https://npm.io/package/@skivvy/skivvy-package-browserify

## Dependencies (8)

- [envify](https://npm.io/package/envify.md) ^3.4.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [promise](https://npm.io/package/promise.md) ^7.0.4
- [babelify](https://npm.io/package/babelify.md) ^6.3.0
- [watchify](https://npm.io/package/watchify.md) ^3.3.1
- [uglifyify](https://npm.io/package/uglifyify.md) ^3.0.1
- [browserify](https://npm.io/package/browserify.md) ^10.2.6
- [object-assign](https://npm.io/package/object-assign.md) ^4.0.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2015-08-31
- 0.1.3 — 2015-06-08
- 0.1.2 — 2015-06-05
- 0.1.1 — 2015-06-05
- 0.1.0 — 2015-05-27

## README

# Skivvy package: `browserify`
[![npm version](https://img.shields.io/npm/v/@skivvy/skivvy-package-browserify.svg)](https://www.npmjs.com/package/@skivvy/skivvy-package-browserify)
![Stability](https://img.shields.io/badge/stability-stable-brightgreen.svg)
[![Build Status](https://travis-ci.org/skivvyjs/skivvy-package-browserify.svg?branch=master)](https://travis-ci.org/skivvyjs/skivvy-package-browserify)

> Compile JavaScript using Browserify


## Installation

```bash
skivvy install browserify
```


## Overview

This package allows you to compile JavaScript using [Browserify](http://browserify.org/) from within the [Skivvy](https://www.npmjs.com/package/skivvy) task runner.


## Included tasks

### `browserify`

Compile JavaScript using Browserify

#### Usage:

```bash
skivvy run browserify
```


#### Configuration settings:

| Name | Type | Required | Default | Description |
| ---- | ---- | -------- | ------- | ----------- |
| `source` | `string` `Array<string>` | Yes | N/A | Path to source files |
| `destination` | `string` | Yes | N/A | Path to compiled output file |
| `options` | `object` | No | `{}` | Browserify [API options](https://github.com/substack/node-browserify#browserifyfiles--opts) |
| `options.watch` | `boolean` `object` | No | `false` | Whether to watch source files for changes using [watchify](https://www.npmjs.com/package/watchify) |
| `options.minify` | `boolean` `object` | No | `false` | Whether to minify JS output using the [uglifyify](https://www.npmjs.com/package/uglifyify) transform |
| `options.env` | `string` `object` | No | `null` | Set environment variables and enable [envify](https://www.npmjs.com/package/envify) transform |
| `options.babelify` | `boolean` `object` | No | `false` | Whether to transform JS output using the [babelify](https://www.npmjs.com/package/babelify) transform |
| `options.require` | `Array<string,object>` | No | `[]` | Files to make available outside the bundle |
| `options.external` | `Array<string>` | No | `[]` | Prevent files from being loaded into the current bundle |
| `options.ignore` | `Array<string>` | No | `[]` | Prevent files from showing up in the output bundle (return `{}` when required) |
| `options.exclude` | `Array<string>` | No | `[]` | Prevent files from showing up in the output bundle (throw an error when required) |
| `options.transform` | `Array<string,object,function>` | No | `[]` | Browserify transforms |
| `options.plugin` | `Array<string,object,function>` | No | `[]` | Browserify plugins |


##### Notes:

- If the `watch` configuration setting is a key/value object, that object will be passed as the `watchify()` function's [`opts`](https://github.com/substack/watchify#var-w--watchifyb-opts) argument
- If the `minify` configuration setting is a key/value object, that object will be used as the [UglifyJS2 options](https://github.com/mishoo/UglifyJS2#usage)
- If the `env` configuration setting is a string, `process.env.NODE_ENV` will be set to that value. If it is a key/value object, all the contained values will be assigned to `process.env` as environment variables
- If the `babelify` configuration setting is a key/value object, that object will be used as the [babelify options](https://github.com/babel/babelify#options)
- `options.require` is an array files to make available outside the bundle and any associated options:

	```json
	[
		"./vendor/jquery/jquery.js",
		"./vendor/d3/d3.js",
		{
			"file": "./vendor/angular/angular.js",
			"options": { "expose": "angular" }
		}
	]
	```

	Each entry in `options.require` will be passed to the [`b.require()`](https://github.com/substack/node-browserify#brequirefile-opts) method.

- `options.external` is an array of filenames that are prevented from being loaded into the current bundle:

	```json
	[
		"./external/foo.js",
		"./external/bar.js"
	]
	```

	Each entry in `options.external` will be passed to the [`b.external()`](https://github.com/substack/node-browserify#bexternalfile) method.

- `options.ignore` is an array of filenames that are prevented from showing up in the output bundle:

	```json
	[
		"./hidden/foo.js",
		"./hidden/bar.js"
	]
	```

	Each entry in `options.ignore` will be passed to the [`b.ignore()`](https://github.com/substack/node-browserify#bignorefile) method.

- `options.exclude` is an array of filenames that are prevented from showing up in the output bundle:

	```json
	[
		"./hidden/foo.js",
		"./hidden/bar.js"
	]
	```

	Each entry in `options.exclude` will be passed to the [`b.exclude()`](https://github.com/substack/node-browserify#bexcludefile) method.

- `options.transform` is an array of Browserify transforms and any associated options:

	```json
	[
		"brfs",
		"envify",
		{
			"transform": "babelify",
			"options": { "nonStandard": false, "comments": false }
		}
	]
	```

	> _If configuration is being set programmatically, transforms can also be specified as functions instead of strings._

	Each entry in `options.transforms` will be passed to the [`b.transform()`](https://github.com/substack/node-browserify#btransformtr-opts) method.


- `options.plugin` is an array of Browserify plugins and any associated options:

	```json
	[
		"my-plugin",
		"another-plugin",
		{
			"plugin": "factor-bundle",
			"options": { "outputs": [ "bundle/x.js", "bundle/y.js" ] }
		},
	]
	```

	> _If configuration is being set programmatically, plugins can also be specified as functions instead of strings._

	Each entry in `options.plugin` will be passed to the [`b.plugin()`](https://github.com/substack/node-browserify#bpluginplugin-opts) method.


#### Returns:

`Stream.Writable` The output stream that is written to the filesystem

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