Skip to content

Commit

Permalink
Update version and to lodash switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Serby committed Mar 23, 2013
1 parent 05d592b commit e5d3858
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions lib/map-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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": {
Expand Down

0 comments on commit e5d3858

Please sign in to comment.