{"$schema":"https://doc-kit.nodejs.org/schemas/api-doc/1.0.1.json","id":"generators-legacy-json-all","path":"/generators/legacy-json-all","type":"module","module":"generators-legacy-json-all","title":"Legacy JSON bundle","introducedIn":null,"sourceLink":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"The `legacy-json-all` generator writes the `all.json` of Node.js's legacy JSON\nformat: the sections of every\n[legacy JSON](https://doc-kit.nodejs.org/generators/legacy-json) file merged\ninto one file. It exists for Node.js and the tools that read that file; for\nyour own API in one file, use the\n[JSON bundle](https://doc-kit.nodejs.org/generators/json-all).","summary":"The `legacy-json-all` generator writes the `all.json` of Node.js's legacy JSON format: the sections of every legacy JSON file merged into one file. It exists for Node.js and the tools that read that file; for your own API in one file, use the JSON bundle.","examples":[],"children":[{"kind":"section","id":"usage","name":"Usage","title":"Usage","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"From the root of a Node.js checkout:\n\n```bash\nnpx @doc-kit/cli generate -t legacy-json-all -i \"doc/api/*.md\" -o out \\\n  --index doc/api/index.md\n```\n\nThis writes `out/all.json`. `legacy-json` runs first without being listed, and\nwrites its own files to the same directory, such as `out/fs.json`.","summary":"From the root of a Node.js checkout:","examples":[{"language":"bash","displayName":null,"code":"npx @doc-kit/cli generate -t legacy-json-all -i \"doc/api/*.md\" -o out \\\n  --index doc/api/index.md"}],"children":[]},{"kind":"section","id":"configuring","name":"Configuring","title":"Configuring","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"* `sourceURL` {string} The template `legacy-json` built each file's `source`\n  from, which the bundle uses to match files to the index. If you change\n  `legacy-json.sourceURL`, set the same value here. **Default:**\n  `'doc/api/{path}'`.\n\nIt also reads the\n[global options](https://doc-kit.nodejs.org/configuration#global-options),\nsuch as `index`, which sets the order of the files.","summary":"It also reads the global options, such as `index`, which sets the order of the files.","examples":[],"children":[]},{"kind":"section","id":"what-the-bundle-holds","name":"What the bundle holds","title":"What the bundle holds","scope":"module","overloadOf":null,"stability":null,"added":[],"deprecated":[],"removed":[],"napiVersion":[],"changes":[],"description":"For a `doc/api/kittens.md` holding a `# Kittens` heading and a paragraph:\n\n```json displayName=\"out/all.json\"\n{\n  \"miscs\": [],\n  \"modules\": [\n    {\n      \"textRaw\": \"Kittens\",\n      \"name\": \"kittens\",\n      \"type\": \"module\",\n      \"desc\": \"<p>Everything about <code>Kitten</code> objects.</p>\",\n      \"displayName\": \"Kittens\",\n      \"source\": \"doc/api/kittens.md\"\n    }\n  ],\n  \"classes\": [],\n  \"globals\": [],\n  \"methods\": []\n}\n```\n\n* `miscs`, `modules`, `classes`, `globals` and `methods` hold the sections at\n  the top of every file, in the same format (see\n  [What a file holds](https://doc-kit.nodejs.org/generators/legacy-json#what-a-file-holds)),\n  each with the `source` of its file added.\n* The files the index links to come first, in the order of the links. The rest\n  follow in no set order, so pass an index that lists every file.\n* The file of the top-level `index.md` is left out.","summary":"For a `doc/api/kittens.md` holding a `# Kittens` heading and a paragraph:","examples":[{"language":"json","displayName":"out/all.json","code":"{\n  \"miscs\": [],\n  \"modules\": [\n    {\n      \"textRaw\": \"Kittens\",\n      \"name\": \"kittens\",\n      \"type\": \"module\",\n      \"desc\": \"<p>Everything about <code>Kitten</code> objects.</p>\",\n      \"displayName\": \"Kittens\",\n      \"source\": \"doc/api/kittens.md\"\n    }\n  ],\n  \"classes\": [],\n  \"globals\": [],\n  \"methods\": []\n}"}],"children":[]}]}