Make directories and their parents if needed - Like `mkdir -p`, but cross-platform
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.travis.yml
cli.js
license
package.json
readme.md
test.js

readme.md

make-dir-cli Build Status

Make directories and their parents if needed - Like mkdir -p, but cross-platform

Install

$ npm install --global make-dir-cli

Usage

$ make-dir --help

  Usage
    $ make-dir <dir> …

  Options
    --mode  Directory permissions

  Examples
    $ make-dir unicorn/awesome foo/bar
    $ make-dir rainbow --mode=0666
$ pwd
/Users/sindresorhus/fun

$ tree
.

$ make-dir unicorn/rainbow/cake

$ tree
.
└── unicorn
    └── rainbow
        └── cake

Tip

Create a shell alias for less typing:

alias md=make-dir

Related

License

MIT © Sindre Sorhus