Comparing version 1.1.2 to 2.0.1
var Registry | ||
, Node = require('./node') | ||
, SrcNode = require('./node') | ||
, _ = require('lodash') | ||
, utils = require('utilities') | ||
, SM = require('source-map') | ||
@@ -40,9 +39,6 @@ , SMGenerator = SM.SourceMapGenerator | ||
*/ | ||
Registry.prototype.minify = function (opts, cb) { | ||
Registry.prototype.minify = function (opts) { | ||
var self = this | ||
, lines = this.code.split('\n') | ||
, generator = this.createGenerator(opts) | ||
, min | ||
// Lines lost to minification | ||
, deletedLines = 0 | ||
// What the last line saved from | ||
@@ -52,8 +48,5 @@ // the original bundle is | ||
, buffer = [] | ||
, chain | ||
, chainParams = [] | ||
, minifyNode = function (node, next) { | ||
, minifyNode = function (node) { | ||
var range = node.range() | ||
, consumer | ||
, ii | ||
, firstGeneratedLine; | ||
@@ -72,2 +65,7 @@ | ||
// If minification removed EVERYTHING, use the minified code. | ||
// It was probably already minified, like the prelude | ||
if(res.code === '') { | ||
return; | ||
} | ||
@@ -117,6 +115,6 @@ // We need this to offset the generated line numberse | ||
minifyNode(node); | ||
}) | ||
}); | ||
// Add the remaining code after the last node | ||
for(highWaterMark, ii=lines.length; | ||
for(var ii=lines.length; | ||
highWaterMark<ii; highWaterMark++) { | ||
@@ -170,3 +168,3 @@ buffer.push(lines[highWaterMark]); | ||
if(!this.sourceNodes[file]) { | ||
this.sourceNodes[file] = new Node(file, this.map.sourceContentFor(file)); | ||
this.sourceNodes[file] = new SrcNode(file, this.map.sourceContentFor(file)); | ||
} | ||
@@ -173,0 +171,0 @@ |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "1.1.2", | ||
"version": "2.0.1", | ||
"repository": { | ||
@@ -42,2 +42,5 @@ "type": "git", | ||
}, | ||
"peerDependencies": { | ||
"browserify": "~3.30.0" | ||
}, | ||
"scripts": { | ||
@@ -47,3 +50,3 @@ "test": "jake test --trace" | ||
"devDependencies": { | ||
"browserify": "2.34.x", | ||
"browserify": "~3.30.0", | ||
"jake": "0.7.x", | ||
@@ -62,2 +65,2 @@ "jquery-browserify": "latest", | ||
"license": "MIT" | ||
} | ||
} |
@@ -7,2 +7,4 @@ Minifyify | ||
*Now with browserify 3 support* | ||
Before, browserify made you choose between sane debugging and sane load times. Now, you can have both. | ||
@@ -14,7 +16,2 @@ | ||
## New in 1.0.x | ||
* Simpler, streaming API | ||
* A much more robust algorithm | ||
* Such speed, much performance | ||
## Usage | ||
@@ -21,0 +18,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32
631421
10
15834
111