Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docpad-plugin-uglify

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docpad-plugin-uglify - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

37

out/uglify.plugin.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.4.0
// Generated by CoffeeScript 1.6.3
var __hasProp = {}.hasOwnProperty,

@@ -6,9 +6,9 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

module.exports = function(BasePlugin) {
var UglifyPlugin;
var UglifyPlugin, _ref;
return UglifyPlugin = (function(_super) {
__extends(UglifyPlugin, _super);
function UglifyPlugin() {
return UglifyPlugin.__super__.constructor.apply(this, arguments);
_ref = UglifyPlugin.__super__.constructor.apply(this, arguments);
return _ref;
}

@@ -18,30 +18,11 @@

UglifyPlugin.prototype.config = {
strict_semicolons: true
};
UglifyPlugin.prototype.renderUglify = function(opts, next) {
var ast, content, file, parser, uglify, uglifyjs;
content = opts.content, file = opts.file;
uglifyjs = require("uglify-js");
parser = uglifyjs.parser, uglify = uglifyjs.uglify;
try {
ast = parser.parse(content, this.config.strict_semicolons);
} catch (err) {
return next(err);
}
ast = uglify.ast_mangle(ast);
ast = uglify.ast_squeeze(ast);
opts.content = uglify.gen_code(ast);
return next();
};
UglifyPlugin.prototype.renderDocument = function(opts, next) {
UglifyPlugin.prototype.renderDocument = function(opts) {
var extension;
extension = opts.extension;
if (extension === 'js') {
return this.renderUglify(opts, next);
} else {
return next();
opts.content = require('uglify-js').minify(opts.content, {
fromString: true
}).code;
}
return this;
};

@@ -48,0 +29,0 @@

{
"name": "docpad-plugin-uglify",
"version": "2.0.0",
"version": "2.1.0",
"description": "Adds support for uglify-js's parser/compressor to DocPad",

@@ -33,6 +33,7 @@ "homepage": "http://docpad.org/plugin/uglify",

"dependencies": {
"uglify-js": "~1.3.3"
"uglify-js": "~2.3.6"
},
"devDependencies": {
"coffee-script": "~1.4.0"
"coffee-script": "~1.6.2",
"docpad": ">=6.37 <7"
},

@@ -39,0 +40,0 @@ "main": "./out/uglify.plugin.js",

@@ -1,5 +0,11 @@

# UglifyJS Plugin for DocPad
Adds support for [UglifyJS](https://github.com/mishoo/UglifyJS) 's parser/compressor to [DocPad](https://github.com/bevry/docpad)
# [UglifyJS](https://github.com/mishoo/UglifyJS) Plugin for [DocPad](http://docpad.org)
[![Build Status](https://secure.travis-ci.org/docpad/docpad-plugin-uglify.png?branch=master)](http://travis-ci.org/docpad/docpad-plugin-uglify "Check this project's build status on TravisCI")
[![NPM version](https://badge.fury.io/js/docpad-plugin-uglify.png)](https://npmjs.org/package/docpad-plugin-uglify "View this project on NPM")
[![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://www.paypalobjects.com/en_AU/i/btn/btn_donate_SM.gif)](https://www.paypal.com/au/cgi-bin/webscr?cmd=_flow&SESSION=IHj3DG3oy_N9A9ZDIUnPksOi59v0i-EWDTunfmDrmU38Tuohg_xQTx0xcjq&dispatch=5885d80a13c0db1f8e263663d3faee8d14f86393d55a810282b64afed84968ec "Donate once-off to this project using Paypal")
Automatically minifies your JavaScript output with UglifyJS
## Install

@@ -13,3 +19,3 @@

## History
You can discover the history inside the `History.md` file
[You can discover the history inside the `History.md` file](https://github.com/bevry/docpad-plugin-uglify/blob/master/History.md#files)

@@ -19,2 +25,2 @@

Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
<br/>Copyright &copy; 2012 [Takeharu.Oshida](http://georgeosddev.github.com)
<br/>Copyright &copy; 2012+ [Takeharu.Oshida](http://georgeosddev.github.com)
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