Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.8 update

  • Loading branch information...
commit 5fa40ce3393451668b33bfe455e8c96db551437f 1 parent bcf7d98
@serby authored
Showing with 8 additions and 9 deletions.
  1. +3 −3 lib/compact.js
  2. +3 −3 package.json
  3. +2 −3 test/compact.test.js
View
6 lib/compact.js
@@ -14,11 +14,11 @@ module.exports.createCompact = function(options) {
uglify: {}
}, options);
- if (!path.existsSync(options.srcPath)) {
+ if (!fs.existsSync(options.srcPath)) {
throw new Error('Invalid source path \'' + options.srcPath + '\'');
}
- if (!path.existsSync(options.destPath)) {
+ if (!fs.existsSync(options.destPath)) {
mkdirp(options.destPath);
}
@@ -68,7 +68,7 @@ module.exports.createCompact = function(options) {
var jsPath;
for (var i = 0; i < paths.length; i++) {
- if (path.existsSync(paths[i])) {
+ if (fs.existsSync(paths[i])) {
jsPath = paths[i];
break;
}
View
6 package.json
@@ -2,7 +2,7 @@
"author": "Paul Serby <paul@serby.net>",
"name": "compact",
"description": "A JavaScript compacting middleware for express",
- "version": "0.1.0",
+ "version": "0.1.1",
"repository": {
"type": "git",
"url": "git://github.com/serby/compact.git"
@@ -12,7 +12,7 @@
"test": "mocha -r should -R spec"
},
"engines": {
- "node": ">=0.6"
+ "node": ">=0.8"
},
"dependencies": {
"lodash": "~0.3",
@@ -22,7 +22,7 @@
},
"devDependencies": {
"mocha": "*",
- "should": ">=0.6",
+ "should": "~1.1",
"async": "~0.1",
"asyncjs": "~0.0"
}
View
5 test/compact.test.js
@@ -1,5 +1,4 @@
-var path = require('path')
- , fs = require('fs')
+var fs = require('fs')
, mkdirp = require('mkdirp')
, async = require('asyncjs');
@@ -31,7 +30,7 @@ describe('compact.js', function() {
it('should create a missing invalid destination path', function(done) {
var compact = require('../../compact').createCompact({ srcPath: srcPath, destPath: destPath + '/invalid-dest' });
setTimeout(function () {
- path.existsSync(destPath + '/invalid-dest').should.equal(true);
+ fs.existsSync(destPath + '/invalid-dest').should.equal(true);
done();
}, 10);
});
Please sign in to comment.
Something went wrong with that request. Please try again.