chdir-promise
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "chdir-promise", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Change working dir and return a promise, a stack of folders is maintained to jump back", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,6 +12,7 @@ # chdir-promise | ||
```js | ||
var folders = require('chdir-promise'); | ||
folders.to('foo/bar/folder') | ||
var chdir = require('chdir-promise'); | ||
// only has two methods: chdir.to and chdir.comeBack | ||
chdir.to('foo/bar/folder') | ||
// do something inside foo/bar/folder | ||
.then(folders.comeBack) | ||
.then(chdir.comeBack) | ||
.done(); | ||
@@ -23,7 +24,7 @@ ``` | ||
```js | ||
folders.to('foo/bar/folder') | ||
chdir.to('foo/bar/folder') | ||
.then(function () { | ||
return 'foo'; // value to return | ||
}) | ||
.tap(folders.comeBack); | ||
.tap(chdir.comeBack); | ||
// resolved with value 'foo' | ||
@@ -30,0 +31,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5657
86