Comparing version 0.1.9 to 0.1.10
@@ -9,3 +9,3 @@ /** | ||
* | ||
* @version 0.1.9 | ||
* @version 0.1.10 | ||
*/ | ||
@@ -30,3 +30,3 @@ | ||
}, | ||
tmpDir = os.tmpdir || os.tmpDir, | ||
tmpDir = os.tmpdir || os.tmpDir || function() { return '/tmp'; }, | ||
makeDir = promisify(fs.mkdir), | ||
@@ -33,0 +33,0 @@ removeDir = promisify(fs.rmdir), |
{ | ||
"name" : "vow-fs", | ||
"version" : "0.1.9", | ||
"version" : "0.1.10", | ||
"description" : "File I/O by Vow", | ||
@@ -5,0 +5,0 @@ "homepage" : "https://github.com/dfilatov/vow-fs", |
@@ -6,2 +6,6 @@ Vow-fs [![Build Status](https://secure.travis-ci.org/dfilatov/vow-fs.png)](http://travis-ci.org/dfilatov/vow-fs) | ||
Requirements | ||
------------ | ||
Vow-fs works with Node.js 0.6, 0.8 and 0.10. | ||
Getting Started | ||
@@ -13,2 +17,3 @@ --------------- | ||
####Usage#### | ||
````javascript | ||
@@ -15,0 +20,0 @@ var fs = require('vow-fs'); |
12
test.js
@@ -1,5 +0,9 @@ | ||
var vfs = require('./lib/fs'); | ||
var fs = require('./lib/fs'), | ||
path = require('path'); | ||
vfs.makeTmpFile({ dir : '/' }).then(function(path) { | ||
console.log(path); | ||
}).done(); | ||
fs.remove('test/test-dir').then(function(ex) { | ||
console.log('!'); | ||
}, function(err) { | ||
console.log(err); | ||
}) | ||
@@ -5,2 +5,3 @@ var fs = require('fs'), | ||
vfs = require('../lib/fs'), | ||
tmpDir = os.tmpdir || os.tmpDir || function() { return '/tmp'; }, | ||
TEST_DIR = path.join(__dirname, 'test-dir'); | ||
@@ -32,3 +33,3 @@ | ||
fs.unlinkSync(filePath); | ||
test.strictEqual(path.dirname(filePath), path.resolve(os.tmpdir())); | ||
test.strictEqual(path.dirname(filePath), path.resolve(tmpDir())); | ||
test.strictEqual(path.extname(filePath), '.tmp'); | ||
@@ -35,0 +36,0 @@ test.ok(exists); |
27015
716
69