A Node.js utility to create directories recursively with a promise-based API and custom filesystem support.
make-dir is a Node.js library that creates directories and their parent directories recursively, similar to the Unix `mkdir -p` command. It solves the common problem of safely creating nested directory structures in Node.js applications with a promise-based API and enhanced flexibility over native methods.
Node.js developers who need reliable, cross-platform directory creation in their applications, especially those working with filesystem operations, build tools, or CLI utilities.
Developers choose make-dir for its promise-based API, custom filesystem support, and active maintenance, which fix issues found in alternatives like `mkdirp` while providing better compatibility and testing than native `fsPromises.mkdir`.
Make a directory and its parents if needed - Think mkdir -p
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Fully async/await compatible, returning promises for easy asynchronous directory creation, as shown in the usage examples with async/await syntax.
Allows integration with alternative filesystem implementations like graceful-fs, providing flexibility for enhanced error handling and custom behavior.
CI-tested on macOS, Linux, and Windows, ensuring consistent directory creation across different operating systems, as highlighted in the README.
Actively maintained with fixes for issues found in older alternatives like mkdirp, ensuring long-term reliability and updates.
The main advantage over native Node.js methods is custom filesystem support, which many projects don't need, making it an unnecessary dependency for common scenarios.
When using a custom fs implementation, it cannot leverage the native recursive option, potentially leading to slower performance compared to direct native usage.
For command-line usage, developers must install a separate package (make-dir-cli), adding complexity and an extra dependency for CLI tasks.