{"id":13903043,"url":"https://github.com/fliegwerk/fliegdoc","last_synced_at":"2025-03-17T10:08:31.373Z","repository":{"id":38330668,"uuid":"327479369","full_name":"fliegwerk/fliegdoc","owner":"fliegwerk","description":"A documentation generator for Typescript-based libraries with good support for monorepos","archived":false,"fork":false,"pushed_at":"2024-10-29T22:44:21.000Z","size":2223,"stargazers_count":33,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-30T00:46:51.449Z","etag":null,"topics":["cli","doc-page","docs","documentation","documentation-generator","ejs","ejs-templates","express","generator","node","nodejs","typescript","yargs"],"latest_commit_sha":null,"homepage":"https://fliegwerk.github.io/fliegdoc","language":"TypeScript","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/fliegwerk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-01-07T02:16:10.000Z","updated_at":"2024-10-29T22:43:56.000Z","dependencies_parsed_at":"2023-10-11T00:58:35.680Z","dependency_job_id":"9cad9c59-424c-4a5c-8051-037428e91ffe","html_url":"https://github.com/fliegwerk/fliegdoc","commit_stats":{"total_commits":787,"total_committers":8,"mean_commits":98.375,"dds":0.5844980940279543,"last_synced_commit":"940ff796c4db5af67afd47c599a7336a68d136ba"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliegwerk%2Ffliegdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliegwerk%2Ffliegdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliegwerk%2Ffliegdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fliegwerk%2Ffliegdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fliegwerk","download_url":"https://codeload.github.com/fliegwerk/fliegdoc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014136,"owners_count":20383715,"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":["cli","doc-page","docs","documentation","documentation-generator","ejs","ejs-templates","express","generator","node","nodejs","typescript","yargs"],"created_at":"2024-08-06T22:01:35.020Z","updated_at":"2025-03-17T10:08:31.328Z","avatar_url":"https://github.com/fliegwerk.png","language":"TypeScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# Welcome to fliegdoc 👋\n\n[![Version](https://img.shields.io/npm/v/fliegdoc)](https://www.npmjs.com/package/fliegdoc)\n![Prerequisite](https://img.shields.io/badge/node-%3E12.0.0-blue.svg)\n[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://fliegwerk.github.io/fliegdoc)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/fliegwerk/fliegdoc/graphs/commit-activity)\n[![License: MIT](https://img.shields.io/github/license/fliegwerk/fliegdoc)](https://github.com/fliegwerk/fliegdoc/blob/master/LICENSE)\n[![Twitter: pklaschka2000](https://img.shields.io/twitter/follow/pklaschka2000.svg?style=social)](https://twitter.com/pklaschka2000)\n\n\u003e A documentation generator for Typescript-based libraries with good support for monorepos\n\n### 🏠 [Homepage, Demo \u0026 Docs](https://fliegwerk.github.io/fliegdoc)\n\n## Prerequisites\n\n- node \u003e12.0.0\n\n## Install\n\n```sh\nnpm install --global fliegdoc\n```\n\n## Usage\n\n### CLI\n\n```sh\n$ fliegdoc --help\nUsage: fliegdoc [command] [options]\n\nCommands:\n  fliegdoc build [options]  Build the documentation       [default] [aliases: b]\n  fliegdoc serve [options]  Preview the documentation in the browser[aliases: s]\n  fliegdoc completion       generate completion script\n\nOptions:\n      --help     Show help                                             [boolean]\n  -s, --serve    Serve the static files after build   [boolean] [default: false]\n  -p, --port     The port on which the documentation gets hosted        [number]\n  -v, --version  Show version number                                   [boolean]\n\nGet help for individual commands by running fliegdoc \u003ccommand\u003e --help\n```\n\nThe CLI searches for a `fliegdoc.config.js` file and applies its options **on top of the default options**.\n\n#### Example `fliegdoc.config.js` with default options\n\n```js\n// fliegdoc.config.js\nconst { HTMLTheme } = require('fliegdoc');\n\nmodule.exports = {\n\tbaseUrl: '/',\n\toutDir: './docs',\n\treadme: './README.md',\n\tmodules: [\n\t\t{\n\t\t\tpackage: './package.json',\n\t\t\ttsconfig: './tsconfig.json',\n\t\t\tmainFile: 'main.ts'\n\t\t}\n\t],\n\ttitle: 'Documentation', // appears in the page title and header\n\texternalLinks: {}, // e.g.: { \"GitHub\": \"https://github.com/fliegwerk/fliegdoc\" }\n\thidePrivateMembers: true,\n\ttheme: HTMLTheme\n};\n```\n\n### API\n\n```ts\nimport {} from 'fliegdoc';\n```\n\n(cf. [docs](https://fliegwerk.github.io/fliegdoc/fliegdoc) for a list of exported members)\n\n### Themes\n\n![Theme Overview](./assets/drawio/core-theme-relationship.drawio.png)\n\nThemes take the doc-ready AST and configuration and write a resulting file structure.\n\nIn code, themes are implemented as objects that implement the `Theme` interface. This means that they have both a\nproperty `isBrowserViewable: boolean` and a method `onBuild()`.\n\nThe `isBrowserViewable` property should be `false` unless the theme is intended to be used in the browser (e.g.,\noutputting HTML files).\n\nThe `onBuild` method is called with the doc-ready AST and configuration as arguments. As third argument, it gets passed\na `CreateFileFunction` (`( path: string, content: Buffer, mimetype: string ) =\u003e Promise\u003cvoid\u003e`), that you **must use**\nto create files in the output folder. You must use that function so that any necessary cleanup can be done by fliegdoc.\n\nThe object then gets passed as `theme` in the configuration object.\n\nA simple example theme outputting the raw AST as JSON could look like this:\n\n```ts\n// fliegdoc.config.js\n// a theme that outputs the raw AST as JSON files\nconst theme = {\n\tisBrowserViewable: false, // don't use this in the browser\n\tonBuild(ast, config, createFile) {\n\t\tfor (const module in ast) {\n\t\t\t// iterate over modules\n\t\t\tconst { name } = ast[module]; // e.g. 'fliegdoc'\n\t\t\tconst fileName = `${name}.json`; // e.g. 'fliegdoc.json'\n\t\t\tconst content = JSON.stringify(ast[module], null, 2);\n\n\t\t\t// create the file\n\t\t\tcreateFile(fileName, Buffer.from(content), 'application/json');\n\t\t}\n\t}\n};\n\nmodule.exports = { theme /* [...] */ }; // add the theme to the configuration\n```\n\n_Please note that there may be changes to the doc-ready AST structure with new TypeScript releases,\nso we can't provide detailed documentation on its structure.\nWe recommend studying the raw output to get a sense of how the output is structured._\n\n## Author\n\n👤 **Pablo Klaschka**\n\n- Twitter: [@pklaschka2000](https://twitter.com/pklaschka2000)\n- Github: [@pklaschka](https://github.com/pklaschka)\n- LinkedIn: [@pklaschka](https://linkedin.com/in/pklaschka)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\n\nFeel free to check [issues page](https://github.com/fliegwerk/fliegdoc/issues). You can also take a look at\nthe [contributing guide](https://github.com/fliegwerk/fliegdoc/blob/master/CONTRIBUTING.md).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2021 [Pablo Klaschka](https://github.com/pklaschka).\n\nThis project is [MIT](https://github.com/fliegwerk/fliegdoc/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliegwerk%2Ffliegdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffliegwerk%2Ffliegdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffliegwerk%2Ffliegdoc/lists"}