mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-07-07 13:57:29 +00:00
Remove absolute paths
This commit is contained in:
+15
-8
@@ -1,4 +1,4 @@
|
||||
# make-dir [](https://travis-ci.org/sindresorhus/make-dir) [](https://ci.appveyor.com/project/sindresorhus/make-dir/branch/master) [](https://codecov.io/gh/sindresorhus/make-dir)
|
||||
# make-dir [](https://travis-ci.org/sindresorhus/make-dir) [](https://codecov.io/gh/sindresorhus/make-dir)
|
||||
|
||||
> Make a directory and its parents if needed - Think `mkdir -p`
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
- CI-tested on macOS, Linux, and Windows
|
||||
- Actively maintained
|
||||
- Doesn't bundle a CLI
|
||||
- Uses native the `fs.mkdir/mkdirSync` [`recursive` option](https://nodejs.org/dist/latest/docs/api/fs.html#fs_fs_mkdir_path_options_callback) in Node.js >=10.12.0 unless [overridden](#fs)
|
||||
|
||||
|
||||
## Install
|
||||
@@ -32,10 +33,12 @@ $ tree
|
||||
```js
|
||||
const makeDir = require('make-dir');
|
||||
|
||||
makeDir('unicorn/rainbow/cake').then(path => {
|
||||
(async () => {
|
||||
const path = await makeDir('unicorn/rainbow/cake');
|
||||
|
||||
console.log(path);
|
||||
//=> '/Users/sindresorhus/fun/unicorn/rainbow/cake'
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
```
|
||||
@@ -51,10 +54,12 @@ Multiple directories:
|
||||
```js
|
||||
const makeDir = require('make-dir');
|
||||
|
||||
Promise.all([
|
||||
makeDir('unicorn/rainbow')
|
||||
makeDir('foo/bar')
|
||||
]).then(paths => {
|
||||
(async () => {
|
||||
const paths = await Promise.all([
|
||||
makeDir('unicorn/rainbow'),
|
||||
makeDir('foo/bar')
|
||||
]);
|
||||
|
||||
console.log(paths);
|
||||
/*
|
||||
[
|
||||
@@ -62,7 +67,7 @@ Promise.all([
|
||||
'/Users/sindresorhus/fun/foo/bar'
|
||||
]
|
||||
*/
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
@@ -100,6 +105,8 @@ Default: `require('fs')`
|
||||
|
||||
Use a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs).
|
||||
|
||||
Using a custom `fs` implementation will block the use of the native `recursive` option if `fs.mkdir` or `fs.mkdirSync` is not the native function.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
|
||||
Reference in New Issue
Block a user