rsnext/packages/create-next-app/helpers/make-dir.ts
Cristian Dominguez f4f6fea71f
CNA: replace make-dir with core recursive mkdir (#15006)
Fix #14902 

I created a separated helper that wraps `fs.promises.mkdir` and sets `recursive` option to `true` by default.

I'm not sure if this is the right approach (maybe it should just call `fs.promises.mkdir` from `create-app.ts`?), any thoughts?
2020-07-10 01:29:03 +00:00

8 lines
157 B
TypeScript

import fs from 'fs'
export function makeDir(
root: string,
options = { recursive: true }
): Promise<void> {
return fs.promises.mkdir(root, options)
}