Permalink
Browse files

Update version and to lodash switch

  • Loading branch information...
1 parent 05d592b commit e5d3858050e16cbaf7a84fe510eb9c05d1ec5f1c @serby committed Mar 23, 2013
Showing with 13 additions and 14 deletions.
  1. +9 −10 lib/map-path.js
  2. +4 −4 package.json
View
19 lib/map-path.js
@@ -3,29 +3,28 @@ var url = require('url')
, crypto = require('crypto')
, fs = require('fs')
, path = require('path')
- , _ = require('underscore')
+ , _ = require('lodash')
, walker = require('walker')
;
module.exports = function(dirPath, params, callback) {
var
- files = [],
- options = {
- basePath: '',
- hash: hash
- };
+ files = []
if ((callback === undefined) && (typeof params === 'function')) {
callback = params;
}
+ var options = _.extend({
+ basePath: '',
+ hash: hash
+ }, params);
+
if (!dirPath) {
return callback(new Error('Path is required'));
}
- options = _.extend({}, options, params);
-
function hash(filename, callback) {
var
md5sum = crypto.createHash('md5'),
@@ -64,9 +63,9 @@ module.exports = function(dirPath, params, callback) {
}
if (options.fileList) {
- for (var i in options.fileList) {
+ for (var i in options.fileList) {
files.push(options.fileList[i]);
- }
+ }
makeHashMap(callback);
return;
}
View
8 package.json
@@ -2,7 +2,7 @@
"author": "Paul Serby <paul@serby.net>",
"name": "versionator",
"description": "Static content versioning middleware for connect and express.",
- "version": "0.2.0",
+ "version": "0.2.1",
"repository": {
"type": "git",
"url": "git@github.com:serby/versionator.git"
@@ -12,11 +12,11 @@
"test": "mocha"
},
"engines": {
- "node": ">0.4.0"
+ "node": ">0.8.0"
},
"dependencies": {
- "async": "~0.1",
- "underscore": "~1.3",
+ "async": "~0.2",
+ "lodash": "~1.0",
"walker": "~1.0"
},
"devDependencies": {

0 comments on commit e5d3858

Please sign in to comment.