Skip to content

Commit

Permalink
Added pinkie-promise as promise library for pify
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVerschueren committed Oct 4, 2015
1 parent 15b1e24 commit 9327b26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var fs = require('graceful-fs');
var mkdirp = require('mkdirp');
var uuid = require('uuid');
var pify = require('pify');
var Promise = require('pinkie-promise');
var TMP_DIR = osTmpdir();

function tempfile(filepath) {
Expand All @@ -14,9 +15,9 @@ function tempfile(filepath) {
module.exports = function (str, filepath) {
var fullpath = tempfile(filepath);

return pify(mkdirp)(path.dirname(fullpath))
return pify(mkdirp, Promise)(path.dirname(fullpath))
.then(function () {
return pify(fs.writeFile)(fullpath, str);
return pify(fs.writeFile, Promise)(fullpath, str);
})
.then(function () {
return fullpath;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"mkdirp": "^0.5.0",
"os-tmpdir": "^1.0.0",
"pify": "^2.2.0",
"pinkie-promise": "^1.0.0",
"uuid": "^2.0.1"
},
"devDependencies": {
Expand Down

0 comments on commit 9327b26

Please sign in to comment.