# docpad-plugin-uglify

> Minify JavaScript in DocPad using UglifyJS

Latest version **2.6.0** (published 2018-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install docpad-plugin-uglify
pnpm add docpad-plugin-uglify
yarn add docpad-plugin-uglify
bun add docpad-plugin-uglify
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.6.0 |
| Published | 2018-07-11 |
| First published | 2012-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 2 |
| Unpacked size | 22.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Takeharu Oshida |
| Maintainers | balupton, bevryme, georgeosddev, kizu, robloach, stormpooper |
| Keywords | docpad, docpad-plugin, uglify, uglify-js |

## Links

- npm: https://www.npmjs.com/package/docpad-plugin-uglify
- Repository: https://github.com/docpad/docpad-plugin-uglify
- Homepage: ssh://git@github.com/docpad/docpad-plugin-uglify
- Issues: ssh://git@github.com/docpad/docpad-plugin-uglify/issues
- npm.io page: https://npm.io/package/docpad-plugin-uglify

## Dependencies (2)

- [editions](https://npm.io/package/editions.md) ^1.3.4
- [uglify-js](https://npm.io/package/uglify-js.md) ~3.4.4

## Recent versions

- 2.6.0 (latest) — 2018-07-11
- 2.5.0 — 2017-04-20
- 2.4.0 — 2014-01-28
- 2.3.0 — 2013-12-12
- 2.2.0 — 2013-06-07
- 2.1.0 — 2013-06-07
- 2.0.0 — 2013-03-06
- 1.0.0 — 2012-10-18

## README

<!-- TITLE/ -->

<h1>docpad-plugin-uglify</h1>

<!-- /TITLE -->


<!-- BADGES/ -->

<span class="badge-travisci"><a href="http://travis-ci.org/docpad/docpad-plugin-uglify" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/docpad/docpad-plugin-uglify/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-npmversion"><a href="https://npmjs.org/package/docpad-plugin-uglify" title="View this project on NPM"><img src="https://img.shields.io/npm/v/docpad-plugin-uglify.svg" alt="NPM version" /></a></span>
<span class="badge-npmdownloads"><a href="https://npmjs.org/package/docpad-plugin-uglify" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/docpad-plugin-uglify.svg" alt="NPM downloads" /></a></span>
<span class="badge-daviddm"><a href="https://david-dm.org/docpad/docpad-plugin-uglify" title="View the status of this project's dependencies on DavidDM"><img src="https://img.shields.io/david/docpad/docpad-plugin-uglify.svg" alt="Dependency Status" /></a></span>
<span class="badge-daviddmdev"><a href="https://david-dm.org/docpad/docpad-plugin-uglify#info=devDependencies" title="View the status of this project's development dependencies on DavidDM"><img src="https://img.shields.io/david/dev/docpad/docpad-plugin-uglify.svg" alt="Dev Dependency Status" /></a></span>
<br class="badge-separator" />
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span>
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>
<span class="badge-bitcoin"><a href="https://bevry.me/bitcoin" title="Donate once-off to this project using Bitcoin"><img src="https://img.shields.io/badge/bitcoin-donate-yellow.svg" alt="Bitcoin donate button" /></a></span>
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span>
<br class="badge-separator" />
<span class="badge-slackin"><a href="https://slack.bevry.me" title="Join this project's slack community"><img src="https://slack.bevry.me/badge.svg" alt="Slack community badge" /></a></span>

<!-- /BADGES -->


Minify JavaScript files with the `uglify: true` meta data, using [UglifyJS](https://github.com/mishoo/UglifyJS2).


<!-- INSTALL/ -->

<h2>Install</h2>

Install this DocPad plugin by entering <code>docpad install uglify</code> into your terminal.

<!-- /INSTALL -->


## Usage

Create a JavaScript file with the *uglify* option:

``` javascript
/***
uglify: true
***/

var hello = "Hello World!";
```

## Configure

### Defaults

By default this plugin is disabled for the development environment. You can enable it for the development environment, by adding the following to your [DocPad configuration file](http://docpad.org/docs/config).

``` coffee
plugins:
	uglify:
		uglifyOpts: {}
		environments:
			development:
				enabled: true
```

You can also specify custom configuration for uglify, via the `uglifyOpts` property.

### Template Configuration

It is possible to override the default configuration on a per-template basis:

``` javascript
/***
uglify:
	mangle: false
***/

// The "hello" variable name will stay the same.
var hello = "Hello World!";
```

<!-- HISTORY/ -->

<h2>History</h2>

<a href="https://github.com/docpad/docpad-plugin-uglify/blob/master/HISTORY.md#files">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>

<!-- /HISTORY -->


<!-- CONTRIBUTE/ -->

<h2>Contribute</h2>

<a href="https://github.com/docpad/docpad-plugin-uglify/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

<!-- /CONTRIBUTE -->


<!-- BACKERS/ -->

<h2>Backers</h2>

<h3>Maintainers</h3>

These amazing people are maintaining this project:

<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository docpad/docpad-plugin-uglify">view contributions</a></li>
<li><a href="https://github.com/robloach">Rob Loach</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=robloach" title="View the GitHub contributions of Rob Loach on repository docpad/docpad-plugin-uglify">view contributions</a></li>
<li><a href="http://georgeosddev.github.io/">Takeharu.Oshida</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=georgeOsdDev" title="View the GitHub contributions of Takeharu.Oshida on repository docpad/docpad-plugin-uglify">view contributions</a></li></ul>

<h3>Sponsors</h3>

No sponsors yet! Will you be the first?

<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span>
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>
<span class="badge-bitcoin"><a href="https://bevry.me/bitcoin" title="Donate once-off to this project using Bitcoin"><img src="https://img.shields.io/badge/bitcoin-donate-yellow.svg" alt="Bitcoin donate button" /></a></span>
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span>

<h3>Contributors</h3>

These amazing people have contributed code to this project:

<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository docpad/docpad-plugin-uglify">view contributions</a></li>
<li><a href="https://github.com/robloach">Rob Loach</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=robloach" title="View the GitHub contributions of Rob Loach on repository docpad/docpad-plugin-uglify">view contributions</a></li>
<li><a href="http://georgeosddev.github.io/">Takeharu.Oshida</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=georgeOsdDev" title="View the GitHub contributions of Takeharu.Oshida on repository docpad/docpad-plugin-uglify">view contributions</a></li>
<li><a href="http://robloach.net">Rob Loach</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=RobLoach" title="View the GitHub contributions of Rob Loach on repository docpad/docpad-plugin-uglify">view contributions</a></li>
<li><a href="https://github.com/vsopvsop">vsopvsop</a> — <a href="https://github.com/docpad/docpad-plugin-uglify/commits?author=vsopvsop" title="View the GitHub contributions of vsopvsop on repository docpad/docpad-plugin-uglify">view contributions</a></li></ul>

<a href="https://github.com/docpad/docpad-plugin-uglify/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

<!-- /BACKERS -->


<!-- LICENSE/ -->

<h2>License</h2>

Unless stated otherwise all works are:

<ul><li>Copyright &copy; <a href="http://georgeosddev.github.com">Takeharu Oshida</a></li></ul>

and licensed under:

<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul>

<!-- /LICENSE -->

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