{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["mkdir","mkdirp","make","directories","dir","dirs","folders","directory","folder","path","parent","parents","intermediate","recursively","recursive","create","fs","filesystem","file-system"],"dist-tags":{"latest":"1.0.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"description":"Make a directory and its parents if needed - Think `mkdir -p`","readme":"# make-dir [![Build Status: macOS & Linux](https://travis-ci.org/sindresorhus/make-dir.svg?branch=master)](https://travis-ci.org/sindresorhus/make-dir) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/e0vtt8y600w91gcs/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/make-dir/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/make-dir/badge.svg)](https://coveralls.io/github/sindresorhus/make-dir)\n\n> Make a directory and its parents if needed - Think `mkdir -p`\n\n\n## Advantages over [`mkdirp`](https://github.com/substack/node-mkdirp)\n\n- Promise API *(Async/await ready!)*\n- Fixes many `mkdirp` issues: [#96](https://github.com/substack/node-mkdirp/pull/96) [#70](https://github.com/substack/node-mkdirp/issues/70) [#66](https://github.com/substack/node-mkdirp/issues/66)\n- 100% test coverage\n- CI-tested on macOS, Linux, and Windows\n- Actively maintained\n- Doesn't bundle a CLI\n\n\n## Install\n\n```\n$ npm install --save make-dir\n```\n\n\n## Usage\n\n```\n$ pwd\n/Users/sindresorhus/fun\n$ tree\n.\n```\n\n```js\nconst makeDir = require('make-dir');\n\nmakeDir('unicorn/rainbow/cake').then(path => {\n\tconsole.log(path);\n\t//=> '/Users/sindresorhus/fun/unicorn/rainbow/cake'\n});\n```\n\n```\n$ tree\n.\n└── unicorn\n    └── rainbow\n        └── cake\n```\n\nMultiple directories:\n\n```js\nconst makeDir = require('make-dir');\n\nPromise.all([\n\tmakeDir('unicorn/rainbow')\n\tmakeDir('foo/bar')\n]).then(paths => {\n\tconsole.log(paths);\n\t/*\n\t[\n\t\t'/Users/sindresorhus/fun/unicorn/rainbow',\n\t\t'/Users/sindresorhus/fun/foo/bar'\n\t]\n\t*/\n});\n```\n\n\n## API\n\n### makeDir(path, [options])\n\nReturns a `Promise` for the path to the created directory.\n\n### makeDir.sync(path, [options])\n\nReturns the path to the created directory.\n\n#### path\n\nType: `string`\n\nDirectory to create.\n\n#### options\n\nType: `Object`\n\n##### mode\n\nType: `integer`<br>\nDefault: `0o777 & (~process.umask())`\n\nDirectory [permissions](https://x-team.com/blog/file-system-permissions-umask-node-js/).\n\n##### fs\n\nType: `Object`<br>\nDefault: `require('fs')`\n\nUse a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs).\n\n\n## Related\n\n- [make-dir-cli](https://github.com/sindresorhus/make-dir-cli) - CLI for this module\n- [del](https://github.com/sindresorhus/del) - Delete files and directories\n- [globby](https://github.com/sindresorhus/globby) - User-friendly glob matching\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/make-dir.git"},"users":{"raycharles":true},"bugs":{"url":"https://github.com/sindresorhus/make-dir/issues"},"license":"MIT","versions":{"1.0.0":{"name":"make-dir","version":"1.0.0","description":"Make a directory and its parents if needed - Think `mkdir -p`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/make-dir.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["mkdir","mkdirp","make","directories","dir","dirs","folders","directory","folder","path","parent","parents","intermediate","recursively","recursive","create","fs","filesystem","file-system"],"dependencies":{"pify":"^2.3.0"},"devDependencies":{"ava":"*","coveralls":"^2.13.0","graceful-fs":"^4.1.11","nyc":"^10.2.0","path-type":"^2.0.0","tempy":"^0.1.0","xo":"*"},"gitHead":"5fea1cde511edf07f0ac8101b376269de3f4c98a","bugs":{"url":"https://github.com/sindresorhus/make-dir/issues"},"homepage":"https://github.com/sindresorhus/make-dir#readme","_id":"make-dir@1.0.0","_shasum":"97a011751e91dd87cfadef58832ebb04936de978","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"97a011751e91dd87cfadef58832ebb04936de978","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/make-dir/-/make-dir-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/make-dir-1.0.0.tgz_1494354871618_0.5163482388015836"},"directories":{}}},"name":"make-dir","time":{"modified":"2017-07-04T14:45:14.278Z","created":"2017-05-09T18:34:33.547Z","1.0.0":"2017-05-09T18:34:33.547Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/make-dir#readme"}