{"id":24746568,"url":"https://github.com/samuelmarks/ng-git-gen","last_synced_at":"2026-04-17T17:32:31.947Z","repository":{"id":33679026,"uuid":"160601573","full_name":"SamuelMarks/ng-git-gen","owner":"SamuelMarks","description":"Generates Module, Components and Routes for Github Wiki integration with Angular","archived":false,"fork":false,"pushed_at":"2022-04-13T16:57:57.000Z","size":988,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T00:23:41.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelMarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-06T01:34:12.000Z","updated_at":"2021-05-08T09:13:54.000Z","dependencies_parsed_at":"2022-08-07T23:00:20.186Z","dependency_job_id":null,"html_url":"https://github.com/SamuelMarks/ng-git-gen","commit_stats":null,"previous_names":["samuelmarks/ng-github-wiki-gen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fng-git-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fng-git-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fng-git-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fng-git-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelMarks","download_url":"https://codeload.github.com/SamuelMarks/ng-git-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245042141,"owners_count":20551525,"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":"2025-01-28T04:29:27.675Z","updated_at":"2026-04-17T17:32:31.895Z","avatar_url":"https://github.com/SamuelMarks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ng-git-gen\n==========\n\nGenerates Angular (Module, Components and Routes) from static files in a git repo\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/ng-git-gen.svg)](https://npmjs.org/package/ng-git-gen)\n[![Downloads/week](https://img.shields.io/npm/dw/ng-git-gen.svg)](https://npmjs.org/package/ng-git-gen)\n[![License](https://img.shields.io/npm/l/ng-git-gen.svg)](https://github.com/SamuelMarks/ng-git-gen/blob/master/package.json)\n\n\u003c!-- toc --\u003e\n\n* [Usage](#usage)\n* [Commands](#commands)\n\n\u003c!-- tocstop --\u003e\n\n# Usage\n\n\u003c!-- usage --\u003e\n\n```sh-session\n$ npm install -g ng-git-gen\n$ ng-git-gen COMMAND\nrunning command...\n$ ng-git-gen (-v|--version|version)\nng-git-gen/0.0.18 darwin-x64 node-v14.15.4\n$ ng-git-gen --help [COMMAND]\nUSAGE\n  $ ng-git-gen COMMAND\n...\n```\n\n\u003c!-- usagestop --\u003e\n\n# Commands\n\n\u003c!-- commands --\u003e\n\n\u003c!-- commandsstop --\u003e\n\n## Install\n\n    npm i -g ng-git-gen\n\n## Options\n\n    -R, --global_route                             [default: false] Lazy route in\n                                                 app-routing\n    \n    -a, --afterstrap=afterstrap                    Execute this on the content\n                                                 strings\n    \n    -b, --bootstrap=bootstrap                      Execute this before collecting\n                                                 files with extension\n    \n    -d, --git_dir=git_dir                          [default: tmp] Directory to\n                                                 clone git repo into\n    \n    -e, --ext=ext                                  [default: .md] Extension, e.g.:\n                                                 '.md'\n    \n    -f, --postprocess_content=postprocess_content  Function to run on content\n                                                 before conclusion, e.g.:\n                                                 replace(\"fo\",\n                                                 \"ba\").replace(\"ca\",\"ha\"})\n    \n    -g, --git_url=git_url                          (required) Git URL to use\n                                                 markdown from\n    \n    -h, --help                                     show CLI help\n    \n    -i, --extra_imports=extra_imports              Example: 'import {Foo} from\n                                                 bar;' will add this line, and\n                                                 `Foo` to `imports: []` in\n                                                 Module\n    \n    -l, --list_route                               [default: true] Generate root\n                                                 route, listing all wiki links\n    \n    -m, --global_route_mount=global_route_mount    [default: Value of route flag]\n                                                 If --global-route\n    \n    -o, --output_ext=output_ext                    [default: .html] Output\n                                                 extension\n    \n    -p, --project_dir=project_dir                  (required) angular project dir\n    \n    -r, --route=route                              [default: wiki] Route, e.g.:\n                                                 /wiki\n    \n    -s, --styleUrls=styleUrls                      styleUrls, if starts with http,\n                                                 then will download to generated\n                                                 dir \u0026 update styleUrl to this\n    \n    -v, --verbosity=verbosity                      verbosity\n    \n    --lifecycle=lifecycle                          Add lifecycle to\n                                                 component,e.g.: `--lifecycle\n                                                 AfterViewInit --lifecycle_init\n                                                 'console.info(\"AfterViewInit\");\n                                                 throw Error(\"WOW\")'\n    \n    --lifecycle_init=lifecycle_init                Add lifecycle init to\n                                                 component. See `--lifecycle`\n                                                 for example.\n    \n    --ng_project_name=ng_project_name              angular project name, defaults\n                                                 to first in angular.json\n    \n    --version                                      show CLI version\n\n## Examples\n\n### Full workflow, with github wiki integration\n```bash\n$ ng new foo --routing --interactive=false\n$ cd foo\n$ mkdir src/app/wiki\n$ ng-git-gen -p \"$PWD\" -g 'https://github.com/Fantom-foundation/fantom-dev-web.wiki.git' -l\n```\n\nThis will populate `src/app/wiki/generated`. Next, you can include this in your `src/app/app-routing.module.ts`:\n\n```typescript\nimport { Routes } from '@angular/router';\n\nconst routes: Routes = [{ path: 'wiki', loadChildren: './wiki/generated/generated.module#GeneratedModule' }];\n```\n\n### Github wiki generation\n```bash\n ng-git-gen -p \"$PWD\" -g 'https://github.com/Fantom-foundation/fantom-dev-web.wiki.git' -l\n```\n\n### RFC generation\n```bash\nng-git-gen -p \"$PWD\" -g 'https://github.com/Fantom-foundation/fantom-rfcs' -l -b 'make html_body' -e '.html' -i \"import { NgxPageScrollModule } from 'ngx-page-scroll';\" -f '.replace(/href=\"#/g, `pageScroll href=\"#`)' -r rfc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Fng-git-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelmarks%2Fng-git-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Fng-git-gen/lists"}