# browserify-single-file

> Runs browserify transforms/plugins on a single file. Useful for make pipeline tasks.

Latest version **0.3.0** (published 2014-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install browserify-single-file
pnpm add browserify-single-file
yarn add browserify-single-file
bun add browserify-single-file
```

Provides the command `browserify-single-file`.

## 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.3.0 |
| Published | 2014-08-27 |
| First published | 2014-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Nathan Rajlich |
| Maintainers | tootallnate |
| Keywords | browserify, transform, plugin, run, cli, single, file, make, parallel |

## Links

- npm: https://www.npmjs.com/package/browserify-single-file
- Repository: https://github.com/TooTallNate/browserify-single-file
- Issues: https://github.com/TooTallNate/browserify-single-file/issues
- npm.io page: https://npm.io/package/browserify-single-file

## Dependencies (1)

- [minimist](https://npm.io/package/minimist.md) ~0.2.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.3.0 (latest) — 2014-08-27
- 0.2.1 — 2014-08-27
- 0.2.0 — 2014-08-26

## README

browserify-single-file
======================
### Runs browserify transforms/plugins on a single file.
#### Useful for make pipeline tasks.
[![Build Status](https://travis-ci.org/TooTallNate/browserify-single-file.svg?branch=master)](https://travis-ci.org/TooTallNate/browserify-single-file)


Like browserify(1), but just for a single file. Designed be used inside a
Makefile (ideally running with a high number of parallel `--jobs` running).


Installation
------------

Install `browserify-single-file` using `npm`:

``` bash
$ npm install --global browserify-single-file
```


CLI Usage
---------

A `browserify-single-file` executable gets installed into your `$PATH` when
installed with the npm `-g` global flag.

Say you have the TypeScript file `foo.ts`:

``` typescript
class Foo {
}
```

Now you can use the `tsify` browserify plugin to compile it to JavaScript, with
the source map inlined and included:

``` bash
$ browserify-single-file --plugin tsify foo.ts > foo.js
```

Which would output something like:

``` javascript
var Foo = (function () {
    function Foo() {
    }
    return Foo;
})();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLWNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi90ZXN0L2ZpeHR1cmVzL2Zvby1jbGFzcy50cyJdLCJuYW1lcyI6WyJGb28iLCJGb28uY29uc3RydWN0b3IiXSwibWFwcGluZ3MiOiJBQUFBO0lBQUFBO0lBQVdDLENBQUNBO0FBQUFELElBQURBLFdBQUNBO0FBQURBLENBQUNBLElBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJjbGFzcyBGb28ge31cbiJdfQ==
```

Now when it comes time to invoke `browserify(1)`, there's no need to use any
slow `--transform` or `--plugin` options since the transformation has already
taken place in the compiled `foo.js` file.

For future invokations of browserify, it won't need to recompile the TypeScript
file unless it gets changed again, since Make is good at keeping track of `mtime`
changes.

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