New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uglify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglify - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

3

CHANGELOG.md

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

## 0.1.1 December 08, 2014
* Fix error with relative paths
## 0.1.0 November 14, 2014
* Initial release

@@ -5,2 +5,3 @@ var os = require('os'),

_ = require('underscore'),
string = require('underscore.string'),
grunt = require('../node_modules/grunt/lib/grunt'),

@@ -10,4 +11,4 @@ Uglify;

Uglify = function(sourceFiles, outputFile, isCss, staticRoot) {
this.sourceFiles = _.uniq(sourceFiles);
this.outputFile = outputFile;
this.sourceFiles = this._parseSourceFiles(sourceFiles);
this.outputFile = this._parsePath(outputFile);
this.isCss = (isCss === true);

@@ -17,2 +18,37 @@ this.staticRoot = staticRoot;

Uglify.prototype._parseSourceFiles = function(sourceFiles) {
var _this = this;
sourceFiles = _.map(sourceFiles, function(file) {
file = _this._parsePath(file);
if (fs.existsSync(file)) {
return fs.realpathSync(file);
}
return null;
});
return _.uniq(
_.filter(
sourceFiles, function(sourceFile) {
return sourceFile !== null
}
)
);
};
Uglify.prototype._parsePath = function(file) {
file = string.ltrim(file, './');
if (string.startsWith(file, '/')) {
return file;
}
if (string.startsWith(file, '~/')) {
return path.join(process.env.HOME, string.ltrim(file, '~/'));
}
return path.join(process.cwd(), file);
};
Uglify.prototype.run = function() {

@@ -19,0 +55,0 @@ var sourceFiles = this.sourceFiles,

2

package.json
{
"name": "uglify",
"description": "A simple tool to uglify javascript & css files",
"version": "0.1.0",
"version": "0.1.1",
"author": "Tom.Huang <hzlhu.dargon@gmail.com>",

@@ -6,0 +6,0 @@ "dependencies": {

# Uglify:
Uglify is A simple tool to uglify javascript & css files
Uglify is a simple tool to uglify javascript & css files

@@ -5,0 +5,0 @@ ## Installing:

Sorry, the diff of this file is not supported yet

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