Comparing version 0.3.2 to 0.4.0
@@ -0,1 +1,6 @@ | ||
# v0.4.0 | ||
* Eliminated a few errors with newer versions of node. | ||
* Added support for minifying CSS using the UglifyCSSMinifier. | ||
* Fixed a bug with middleware when dealing with UTF8 files. | ||
# v0.3.2 | ||
@@ -2,0 +7,0 @@ * Better reporting when modules are not found. |
@@ -63,3 +63,4 @@ /** | ||
if (!path || path.indexOf(copier.root)!==0) return done(false); | ||
PATH.exists(path, function(exists) { | ||
var exists = FS.exists || PATH.exists; | ||
exists(path, function(exists) { | ||
if (!exists || allowDirectory) return done(exists); | ||
@@ -200,3 +201,4 @@ FS.stat(path, function(err, stats) { | ||
var self = this; | ||
PATH.exists(realPath, function(exists) { | ||
var exists = FS.exists || PATH.exists; | ||
exists(realPath, function(exists) { | ||
if (!exists) return done(new Error(srcPath + ' not found')); | ||
@@ -203,0 +205,0 @@ FS.stat(realPath, function(err, stats) { |
@@ -165,3 +165,4 @@ /** | ||
function _isFile(file) { | ||
return PATH.existsSync(file) && FS.statSync(file).isFile(); | ||
var existsSync = FS.existsSync || PATH.existsSync; | ||
return existsSync(file) && FS.statSync(file).isFile(); | ||
} | ||
@@ -168,0 +169,0 @@ |
@@ -32,3 +32,3 @@ /** | ||
function getSize(asset) { | ||
return asset.size || asset.body.length; // TODO: fix for real UTF8 | ||
return (asset.size != undefined ? asset.size : asset.body.length); // TODO: fix for real UTF8 | ||
} | ||
@@ -35,0 +35,0 @@ |
@@ -39,3 +39,3 @@ /** | ||
linker: plugins.CommonJSLinker, | ||
minifier: plugins.UglifyMinifier, | ||
minifier: plugins.UglifyJSMinifier, | ||
mainKey: 'main' | ||
@@ -54,3 +54,3 @@ }); | ||
linker: plugins.SimpleMergeLinker, | ||
minifier: plugins.UglifyMinifier, | ||
minifier: plugins.UglifyJSMinifier, | ||
mainkey: 'main' | ||
@@ -67,4 +67,4 @@ }); | ||
analyzer: plugins.GenericAnalyzer, | ||
linker: plugins.SimpleMergeLinker, | ||
minifier: null // none yet defined for CSS | ||
linker: plugins.CSSLinker, | ||
minifier: plugins.UglifyCSSMinifier, | ||
}); | ||
@@ -71,0 +71,0 @@ |
@@ -92,3 +92,4 @@ // Borrowed from resolve package | ||
isFile = opts.isFile || function (file) { | ||
return path.existsSync(file) && fs.statSync(file).isFile(); | ||
var existsSync = fs.existsSync || path.existsSync; | ||
return existsSync(file) && fs.statSync(file).isFile(); | ||
}; | ||
@@ -95,0 +96,0 @@ readFileSync = opts.readFileSync || fs.readFileSync; |
@@ -83,3 +83,4 @@ /** | ||
PATH.exists(path, function(exists) { | ||
var exists = FS.exists || PATH.exists; | ||
exists(path, function(exists) { | ||
if (exists) { | ||
@@ -86,0 +87,0 @@ FS.stat(path, function(err, stat) { |
{ | ||
"name": "convoy", | ||
"version": "v0.3.2", | ||
"version": "v0.4.0", | ||
"author": "Charles Jolley <charles@sproutcore.com>", | ||
@@ -23,2 +23,3 @@ "description": "Pluggable, package-aware asset pipeline for node", | ||
"uglify-js": "~1.2", | ||
"uglifycss": "~0.0.5", | ||
"glob": "~3.1", | ||
@@ -25,0 +26,0 @@ "mime": "~1.2", |
@@ -19,4 +19,8 @@ /** | ||
e.CommonJSLinker = require('./commonjs_linker'); | ||
e.CSSLinker = require('./css_linker'); | ||
e.UglifyMinifier = require('./uglify_minifier'); | ||
// maintain compatibility | ||
e.UglifyMinifier = require('./uglify_js_minifier'); | ||
e.UglifyJSMinifier = require('./uglify_js_minifier'); | ||
e.UglifyCSSMinifier = require('./uglify_css_minifier'); | ||
})(exports); |
@@ -149,3 +149,3 @@ /** | ||
if (err) return done(err); | ||
paths.should.eql(expected); | ||
paths.sort().should.eql(expected); | ||
done(); | ||
@@ -152,0 +152,0 @@ }); |
@@ -12,2 +12,5 @@ /** | ||
// compatibility with older verions of node | ||
var existsSync = FS.existsSync || PATH.existsSync; | ||
RegExp.escape = function(text) { | ||
@@ -87,3 +90,3 @@ return text.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); | ||
if (err) return done(err); | ||
PATH.existsSync(path).should.equal(true); | ||
existsSync(path).should.equal(true); | ||
testmodules(FS.readFileSync(path, 'utf8'), | ||
@@ -109,3 +112,3 @@ 'jquery/lib/jquery', | ||
if (err) return done(err); | ||
PATH.existsSync(path).should.equal(true); | ||
existsSync(path).should.equal(true); | ||
testcss(FS.readFileSync(path, 'utf8'), | ||
@@ -128,3 +131,3 @@ 'bootstrap/styles/reset/type', | ||
if (err) return done(err); | ||
PATH.existsSync(path).should.equal(true, path); | ||
existsSync(path).should.equal(true, path); | ||
done(); | ||
@@ -149,3 +152,3 @@ }); | ||
'built_assets/images/b.png'].forEach(function(file) { | ||
PATH.existsSync(PATH.resolve(buildir, file)).should.equal(true, file); | ||
existsSync(PATH.resolve(buildir, file)).should.equal(true, file); | ||
}); | ||
@@ -172,3 +175,3 @@ done(); | ||
['index.html', 'images/a.png', 'images/b.png'].forEach(function(file) { | ||
PATH.existsSync(PATH.resolve(buildir, file)).should.equal(true, file); | ||
existsSync(PATH.resolve(buildir, file)).should.equal(true, file); | ||
}); | ||
@@ -175,0 +178,0 @@ done(); |
@@ -14,2 +14,4 @@ /** | ||
var existsSync = fs.existsSync || path.existsSync; | ||
/** | ||
@@ -66,3 +68,3 @@ * Returns path to an object within the fixtures directory. Works just like | ||
exports.mkdirSync_p = function(p) { | ||
if (path.existsSync(p)) { | ||
if (existsSync(p)) { | ||
if (!fs.statSync(p).isDirectory()) { | ||
@@ -69,0 +71,0 @@ throw new Error(p + ' is not a directory'); |
@@ -5,1 +5,2 @@ | ||
- Figure out how to add assets from packages. | ||
- Do a better job of detecting requires that are combined from code. |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
144235
84
3939
8
+ Addeduglifycss@~0.0.5
+ Addeduglifycss@0.0.29(transitive)