Freshen packages, use fs-extra to delete temp dir

This commit is contained in:
Matt Godbolt 2014-04-15 20:37:03 -05:00
parent 8b21c5d412
commit 8acef79687
2 changed files with 7 additions and 10 deletions

7
app.js
View File

@ -34,7 +34,7 @@ var nopt = require('nopt'),
path = require('path'),
async = require('async'),
LRU = require('lru-cache'),
fs = require('fs');
fs = require('fs-extra');
var opts = nopt({
'env': [String],
@ -190,10 +190,7 @@ function compile(req, res) {
cacheStats();
}
res.end(result);
fs.unlink(outputFilename, function() {
fs.unlink(inputFilename,
function() { fs.rmdir(dirPath); });
});
fs.remove(dirPath);
taskFinished();
});
});

View File

@ -8,12 +8,12 @@
},
"main": "./app.js",
"dependencies": {
"connect": "2.3.x",
"async": "0.1.x",
"connect": "2.14.x",
"async": "0.7.x",
"fs-extra": "0.8.x",
"nopt": "1.0.x",
"temp": "0.4.x",
"ffi": "1.2.x",
"lru-cache": "2.2.x"
"temp": "0.7.x",
"lru-cache": "2.5.x"
},
"devDependencies": {
"supervisor": "0.3.1"