https://github.com/docpad/docpad-plugin-uglify
Minify JavaScript files with the uglify: true meta data
https://github.com/docpad/docpad-plugin-uglify
docpad-plugin
Last synced: 8 months ago
JSON representation
Minify JavaScript files with the uglify: true meta data
- Host: GitHub
- URL: https://github.com/docpad/docpad-plugin-uglify
- Owner: docpad
- License: other
- Created: 2012-10-17T03:37:57.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-01-01T20:55:51.000Z (over 2 years ago)
- Last Synced: 2025-05-18T20:48:43.434Z (about 1 year ago)
- Topics: docpad-plugin
- Language: JavaScript
- Homepage:
- Size: 175 KB
- Stars: 4
- Watchers: 13
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
docpad-plugin-uglify
Minify JavaScript files with the `uglify: true` meta data, using [UglifyJS](https://github.com/mishoo/UglifyJS2).
## 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!";
```
Install
Install this DocPad plugin by entering docpad install uglify into your terminal.
History
Discover the release history by heading on over to the HISTORY.md file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
-
Benjamin Lupton — view contributions -
Rob Loach — view contributions - Takeharu.Oshida
- Rob Loach
-
vsopvsop — view contributions
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
License
Unless stated otherwise all works are:
- Copyright © Takeharu Oshida
and licensed under: