{"id":22229710,"url":"https://github.com/boycce/directory-json","last_synced_at":"2025-10-28T02:39:26.745Z","repository":{"id":57212260,"uuid":"132051455","full_name":"boycce/directory-json","owner":"boycce","description":"✨ Converts a directory structure into JSON","archived":false,"fork":false,"pushed_at":"2018-05-05T08:18:11.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T16:48:46.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boycce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-03T21:27:28.000Z","updated_at":"2018-05-05T08:34:25.000Z","dependencies_parsed_at":"2022-09-04T03:51:01.685Z","dependency_job_id":null,"html_url":"https://github.com/boycce/directory-json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boycce%2Fdirectory-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boycce%2Fdirectory-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boycce%2Fdirectory-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boycce%2Fdirectory-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boycce","download_url":"https://codeload.github.com/boycce/directory-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245431709,"owners_count":20614182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-03T01:12:03.626Z","updated_at":"2025-10-28T02:39:21.705Z","avatar_url":"https://github.com/boycce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=center\u003e\n  \u003ch1\u003eDirectory JSON\u003c/h1\u003e\n  \u003ch6\u003eConverts a directory structure into JSON\u003c/h6\u003e\n\u003c/div\u003e\n\n## Installation\n\n```shell\nnpm install directory-json --save\n```\n\n## Project Usage\n\n```javascript\nvar directoryJson = require('directory-json')\n\ndirectoryJson('./path/to/my/dir', function (err, res) {\n  if (err) return console.error(err)\n  console.log(res);\n});\n```\n\n## Cli Usage\n\n```shell\n  Usage: directory-json [options] \u003cdir\u003e\n\n  Converts a directory structure into JSON\n\n  Options:\n\n    -v, --version          output the version number\n    -c, --cwd \u003cdir\u003e        Relative from this directory\n    -r, --recurse          Recurse sub-directories\n    -l, --hash-length \u003cn\u003e  Length of the hash to remove from key names\n    -p, --prettify         Prettify the JSON output\n    -h, --help             output usage information\n```\n\n## Options\n\n#### options.cwd\nType: `String`\nDefault value: `'.'`\n\nPaths are relative from this directory.\n\n#### options.recurse\nType: `Boolean`\nDefault value: `true`\n\nWhether to recurse through sub-directories.\n\n#### options.hashLength\nType: `Number`\nDefault value: `0`\n\nLength of the hash to remove from key names.\n\n#### options.prettify\nType: `Boolean`\nDefault value: `false`\n\nWhether to prettify the JSON output.\n\n## Output\n```javascript\n{\n  \"file1\": \"file1.txt\",\n  \"folder\": {\n    \"file2\": \"folder/file2.txt\",\n    \"file3\": \"folder/file3.txt\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboycce%2Fdirectory-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboycce%2Fdirectory-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboycce%2Fdirectory-json/lists"}