diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-01-28 18:39:44 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-01-28 18:39:44 +0100 |
commit | 4b465bedea94688a9adfb9136c9d2970d5496274 (patch) | |
tree | 7e29cc10d07b86d86239bd1cd59fab7996b412ce /lib/fs/index.js | |
parent | 461ef2c68e9086bd77f0a25d57956ebf60308f7c (diff) | |
download | gitbook-4b465bedea94688a9adfb9136c9d2970d5496274.zip gitbook-4b465bedea94688a9adfb9136c9d2970d5496274.tar.gz gitbook-4b465bedea94688a9adfb9136c9d2970d5496274.tar.bz2 |
Fix tests for languages parsing
Diffstat (limited to 'lib/fs/index.js')
-rw-r--r-- | lib/fs/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/fs/index.js b/lib/fs/index.js index 1961b07..7b8fc46 100644 --- a/lib/fs/index.js +++ b/lib/fs/index.js @@ -1,9 +1,10 @@ -var Q = require('q'); var _ = require('lodash'); var path = require('path'); var Buffer = require('buffer').Buffer; var destroy = require('destroy'); +var Promise = require('../utils/promise'); + /* A filesystem is an interface to read/write files GitBook can works with a virtual filesystem, for example in the browser. @@ -73,7 +74,7 @@ FS.prototype.listAllFiles = function(folder) { }); } }); - }, Q([])); + }, Promise([])); }); }; @@ -88,7 +89,7 @@ FS.prototype.readAsString = function(filename) { // Write a stream to a file and returns a promise FS.prototype.writeStream = function(filename, stream) { var bufs = []; - var d = Q.defer(); + var d = Promise.defer(); var cleanup = function() { destroy(stream); |