Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 12, 2020
1 parent 3354122 commit 7201491
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -4,6 +4,7 @@
"description": "Make a directory and its parents if needed - Think `mkdir -p`",
"license": "MIT",
"repository": "sindresorhus/make-dir",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
Expand Down Expand Up @@ -45,14 +46,14 @@
},
"devDependencies": {
"@types/graceful-fs": "^4.1.3",
"@types/node": "^11.12.2",
"@types/node": "^13.7.1",
"ava": "^1.4.0",
"codecov": "^3.2.0",
"graceful-fs": "^4.1.15",
"nyc": "^13.3.0",
"path-type": "^4.0.0",
"tempy": "^0.2.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
"tsd": "^0.11.0",
"xo": "^0.25.4"
}
}
10 changes: 2 additions & 8 deletions readme.md
Expand Up @@ -2,7 +2,6 @@

> Make a directory and its parents if needed - Think `mkdir -p`

## Advantages over [`mkdirp`](https://github.com/substack/node-mkdirp)

- Promise API *(Async/await ready!)*
Expand All @@ -13,14 +12,12 @@
- 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

```
$ npm install make-dir
```


## Usage

```
Expand Down Expand Up @@ -70,7 +67,6 @@ const makeDir = require('make-dir');
})();
```


## API

### makeDir(path, options?)
Expand All @@ -93,21 +89,20 @@ Type: `object`

##### mode

Type: `integer`<br>
Type: `integer`\
Default: `0o777 & (~process.umask())`

Directory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/).

##### fs

Type: `object`<br>
Type: `object`\
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

- [make-dir-cli](https://github.com/sindresorhus/make-dir-cli) - CLI for this module
Expand All @@ -117,7 +112,6 @@ Using a custom `fs` implementation will block the use of the native `recursive`
- [cpy-cli](https://github.com/sindresorhus/cpy-cli) - Copy files on the command-line
- [move-file](https://github.com/sindresorhus/move-file) - Move a file


---

<div align="center">
Expand Down

0 comments on commit 7201491

Please sign in to comment.