{"id":19356350,"url":"https://github.com/prantlf/mkdir.js","last_synced_at":"2026-05-06T00:06:28.093Z","repository":{"id":64189751,"uuid":"573965151","full_name":"prantlf/mkdir.js","owner":"prantlf","description":"Creates directories, if they do not already exist, like the \"mkdir\" command.","archived":false,"fork":false,"pushed_at":"2023-03-21T20:36:36.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-08T23:49:41.181Z","etag":null,"topics":["directory","file-system","filesystem","fs","md","mkdir"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prantlf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-04T01:29:43.000Z","updated_at":"2023-01-29T08:11:23.000Z","dependencies_parsed_at":"2024-11-10T07:14:11.887Z","dependency_job_id":null,"html_url":"https://github.com/prantlf/mkdir.js","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.2222222222222222,"last_synced_commit":"5c4b6e94efde140ddbb823a487b064c7f63215a9"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/prantlf/mkdir.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fmkdir.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fmkdir.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fmkdir.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fmkdir.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/mkdir.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fmkdir.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directory","file-system","filesystem","fs","md","mkdir"],"created_at":"2024-11-10T07:04:06.174Z","updated_at":"2026-05-06T00:06:28.077Z","avatar_url":"https://github.com/prantlf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mkdir.js\n\n[![Latest version](https://img.shields.io/npm/v/@unixcompat/mkdir.js)\n ![Dependency status](https://img.shields.io/librariesio/release/npm/@unixcompat/mkdir.js)\n](https://www.npmjs.com/package/@unixcompat/mkdir.js)\n[![Coverage](https://codecov.io/gh/prantlf/mkdir.js/branch/master/graph/badge.svg)](https://codecov.io/gh/prantlf/mkdir.js)\n\nCreates directories, if they do not already exist, like the `mkdir` command.\n\nThere are multi-platform file-system commands compatible with `mkdir` from UN*X implemented for Node.js in JavaScript, like [mkdirp] or [make-dir-cli], but they have a different interface and a different behaviour than the `mkdir` command. Instead of reusing the knowledge of the `mkdir` command, you would have to learn their new interface. This project aims to provide the well-known interface of the `mkdir` command.\n\nThis package offers only command-line interface, because programmatic interface is provided by [`mkdir`] from [node:fs]. See also other commands compatible with their counterparts from UN*X - [cat.js], [cp.js], [ln.js], [mv.js] and [rm.js].\n\n## Synopsis\n\nThe following scripts from `package.json` won't work on Windows:\n\n    rm -rf dist\n    mkdir -p dist\n    cat src/umd-prolog.txt src/code.js src/umd-epilog.txt \u003e dist/index.umd.js\n    cp src/index.d.ts dist\n    mv LICENSE doc\n    ln -s ../src src\n\nReplace them with the following ones, which run on any operating system which is supported by Node.js:\n\n    rm-j -rf dist\n    mkdir-j -p dist\n    cat-j src/umd-prolog.txt src/code.js src/umd-epilog.txt \u003e dist/index.umd.js\n    cp-j src/index.d.ts dist\n    mv-j LICENSE doc\n    ln-j -s ../src src\n\nNotice that the only difference is the suffix `.js` behind the command names.\n\n## Installation\n\nThis module can be installed in your project using [NPM], [PNPM] or [Yarn]. Make sure, that you use [Node.js] version 14.18 or newer.\n\n```sh\n$ npm i -D @unixcompat/mkdir.js\n$ pnpm i -D @unixcompat/mkdir.js\n$ yarn add -D @unixcompat/mkdir.js\n```\n\n## Command-line Interface\n\nSee also `man mkdir` for the original [POSIX documentation] or for the extended [Linux implementation].\n\n    Usage: mkdir-j [-Dmpv] [--] dir...\n\n    Options:\n      -D|--dry-run      only print path of each directory\n      -m|--mode=\u003cmode\u003e  set file permission bits of the final created directory\n                        as chmod, absolute (octal like 755) or symbolic (a=rwx)\n      -p|--parents      create all directories leading up to the given directory\n                        that do not exist already, no error if existing\n      -v|--verbose      print path of each created directory\n      -V|--version      print version number\n      -h|--help         print usage instructions\n\n    Examples:\n      $ mkdir-j d\n      $ mkdir-j -p /tmp/a/b/c\n\n## Differences\n\nThe following options are specific to this command:\n\n    -D|--dry-run    only print path of each file or directory\n\nThe following options from the Linux version are not supported:\n\n    -Z               set SELinux security context of each created directory\n                     to the default type\n    --context[=CTX]  like -Z, or if CTX is specified then set the SELinux\n                     or SMACK security context to CTX\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style.  Add unit tests for any new or changed functionality. Lint and test your code using `npm test`.\n\n## License\n\nCopyright (c) 2022-2023 Ferdinand Prantl\n\nLicensed under the MIT license.\n\n[Node.js]: http://nodejs.org/\n[NPM]: https://www.npmjs.com/\n[PNPM]: https://pnpm.io/\n[Yarn]: https://yarnpkg.com/\n[mkdirp]: https://www.npmjs.com/package/mkdirp\n[make-dir-cli]: https://www.npmjs.com/package/make-dir-cli\n[cat.js]: https://www.npmjs.com/package/@unixcompat/cat.js\n[cp.js]: https://www.npmjs.com/package/@unixcompat/cp.js\n[ln.js]: https://www.npmjs.com/package/@unixcompat/ln.js\n[mv.js]: https://www.npmjs.com/package/@unixcompat/mv.js\n[rm.js]: https://www.npmjs.com/package/@unixcompat/rm.js\n[POSIX documentation]: https://man7.org/linux/man-pages/man1/mkdir.1p.html\n[Linux implementation]: https://man7.org/linux/man-pages/man1/mkdir.1.html\n[`mkdir`]: https://nodejs.org/api/fs.html#fsmkdirpath-options-callback\n[node:fs]: https://nodejs.org/api/fs.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fmkdir.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fmkdir.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fmkdir.js/lists"}