refactor(mkdirp): reorg (#103)

This commit is contained in:
木杉 2019-01-13 02:07:18 +08:00 committed by Ryan Dahl
parent c42686dc36
commit 41312ad39f
5 changed files with 21 additions and 19 deletions

View File

@ -18,7 +18,7 @@
A library for resolving media types (MIME types) and extensions.
- **[mkdirp](./mkdirp/)**
- **[mkdirp](./fs/)**
Make directory branches.

View File

@ -1,3 +1,22 @@
/**
* # deno-mkdirp
*
* `mkdir -p` 4 `deno`.
*
* ## Import
*
* ```ts
* import { mkdirp } from "https://deno.land/x/std/fs/mkdirp.ts";
* ```
*
* ## API
*
* Same as [`deno.mkdir`](https://deno.land/typedoc/index.html#mkdir).
*
* ### `mkdirp(path: string, mode?: number) : Promise<void>`
*
* Creates directories if they do not already exist and makes parent directories as needed.
*/
import { ErrorKind, FileInfo, lstat, mkdir, platform } from "deno";
const PATH_SEPARATOR: string = platform.os === "win" ? "\\" : "/";

View File

@ -1,17 +0,0 @@
# deno-mkdirp
`mkdir -p` 4 `deno`.
## Import
```ts
import { mkdirp } from "https://deno.land/x/std/mkdirp/mkdirp.ts";
```
## API
Same as [`deno.mkdir`](https://deno.land/typedoc/index.html#mkdir).
### `mkdirp(path: string, mode?: number) : Promise<void>`
Creates directories if they do not already exist and makes parent directories as needed.

View File

@ -7,10 +7,10 @@ import "examples/test.ts";
import "flags/test.ts";
import "logging/test.ts";
import "media_types/test.ts";
import "mkdirp/test.ts";
import "net/bufio_test.ts";
import "net/http_test.ts";
import "net/textproto_test.ts";
import "fs/mkdirp_test.ts";
import "fs/path/basename_test.ts";
import "fs/path/dirname_test.ts";
import "fs/path/extname_test.ts";