docpad-plugin-uglify
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -1,53 +0,50 @@ | ||
// Generated by CoffeeScript 1.3.3 | ||
(function() { | ||
var __hasProp = {}.hasOwnProperty, | ||
__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; }; | ||
// Generated by CoffeeScript 1.4.0 | ||
var __hasProp = {}.hasOwnProperty, | ||
__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; | ||
return UglifyPlugin = (function(_super) { | ||
module.exports = function(BasePlugin) { | ||
var UglifyPlugin; | ||
return UglifyPlugin = (function(_super) { | ||
__extends(UglifyPlugin, _super); | ||
__extends(UglifyPlugin, _super); | ||
function UglifyPlugin() { | ||
return UglifyPlugin.__super__.constructor.apply(this, arguments); | ||
} | ||
function UglifyPlugin() { | ||
return UglifyPlugin.__super__.constructor.apply(this, arguments); | ||
} | ||
UglifyPlugin.prototype.name = 'uglify'; | ||
UglifyPlugin.prototype.name = 'uglify'; | ||
UglifyPlugin.prototype.config = { | ||
strict_semicolons: true | ||
}; | ||
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); | ||
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) { | ||
var extension; | ||
extension = opts.extension; | ||
if (extension === 'js') { | ||
return this.renderUglify(opts, next); | ||
} else { | ||
return next(); | ||
}; | ||
} | ||
}; | ||
UglifyPlugin.prototype.renderDocument = function(opts, next) { | ||
var extension; | ||
extension = opts.extension; | ||
if (extension === 'js') { | ||
return this.renderUglify(opts, next); | ||
} else { | ||
return next(); | ||
} | ||
}; | ||
return UglifyPlugin; | ||
return UglifyPlugin; | ||
})(BasePlugin); | ||
}; | ||
}).call(this); | ||
})(BasePlugin); | ||
}; |
{ | ||
"name": "docpad-plugin-uglify", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Adds support for uglify-js's parser/compressor to DocPad", | ||
"homepage": "https://github.com/bevry/docpad-extras", | ||
"homepage": "http://docpad.org/plugin/uglify", | ||
"keywords": [ | ||
@@ -12,30 +12,32 @@ "docpad", | ||
], | ||
"author": "Takeharu.Oshida(http://georgeosddev.github.com)", | ||
"author": "Takeharu Oshida (http://georgeosddev.github.com)", | ||
"maintainers": [ | ||
"Takeharu.Oshida(http://georgeosddev.github.com)" | ||
"Takeharu Oshida (https://github.com/georgeOsdDev)", | ||
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)" | ||
], | ||
"contributors": [ | ||
"Takeharu.Oshida(http://georgeosddev.github.com)" | ||
"Takeharu Oshida (https://github.com/georgeOsdDev)", | ||
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/bevry/docpad-extras/issues" | ||
"url": "http://docpad.org/plugin/uglify/issues" | ||
}, | ||
"repository" : { | ||
"type": "git", | ||
"url": "http://github.com/bevry/docpad-extras.git" | ||
"url": "https://github.com/docpad/docpad-plugin-uglify.git" | ||
}, | ||
"engines" : { | ||
"node": ">=0.4.0", | ||
"node": ">=0.4", | ||
"docpad": "6.x" | ||
}, | ||
"dependencies": { | ||
"uglify-js": "1.3.3" | ||
"uglify-js": "~1.3.3" | ||
}, | ||
"devDependencies": { | ||
"coffee-script": "1.3.x" | ||
"coffee-script": "~1.4.0" | ||
}, | ||
"main": "./out/uglify.plugin.js", | ||
"scripts": { | ||
"test": "node ./test/uglify.test.js" | ||
"test": "node ./out/uglify.test.js" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3230
4
41
1
+ Addeduglify-js@1.3.5(transitive)
- Removeduglify-js@1.3.3(transitive)
Updateduglify-js@~1.3.3