Generates Angular (Module, Components and Routes) from static files in a git repo
Last updated 2 years ago by samuelmarks .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ng-git-gen 
SYNC missed versions from official npm registry.


Generates Angular (Module, Components and Routes) from static files in a git repo

oclif Version Downloads/week License




npm i -g ng-git-gen


-R, --global_route                             [default: false] Lazy route in

-a, --afterstrap=afterstrap                    Execute this on the content

-b, --bootstrap=bootstrap                      Execute this before collecting
                                             files with extension

-d, --git_dir=git_dir                          [default: tmp] Directory to
                                             clone git repo into

-e, --ext=ext                                  [default: .md] Extension, e.g.:

-f, --postprocess_content=postprocess_content  Function to run on content
                                             before conclusion, e.g.:

-g, --git_url=git_url                          (required) Git URL to use
                                             markdown from

-h, --help                                     show CLI help

-i, --extra_imports=extra_imports              Example: 'import {Foo} from
                                             bar;' will add this line, and
                                             `Foo` to `imports: []` in

-l, --list_route                               [default: true] Generate root
                                             route, listing all wiki links

-m, --global_route_mount=global_route_mount    [default: Value of route flag]
                                             If --global-route

-o, --output_ext=output_ext                    [default: .html] Output

-p, --project_dir=project_dir                  (required) angular project dir

-r, --route=route                              [default: wiki] Route, e.g.:

-s, --styleUrls=styleUrls                      styleUrls, if starts with http,
                                             then will download to generated
                                             dir & update styleUrl to this

-v, --verbosity=verbosity                      verbosity

--lifecycle=lifecycle                          Add lifecycle to
                                             component,e.g.: `--lifecycle
                                             AfterViewInit --lifecycle_init
                                             throw Error("WOW")'

--lifecycle_init=lifecycle_init                Add lifecycle init to
                                             component. See `--lifecycle`
                                             for example.

--ng_project_name=ng_project_name              angular project name, defaults
                                             to first in angular.json

--version                                      show CLI version


Full workflow, with github wiki integration

$ ng new foo --routing --interactive=false
$ cd foo
$ mkdir src/app/wiki
$ ng-git-gen -p "$PWD" -g '' -l

This will populate src/app/wiki/generated. Next, you can include this in your src/app/app-routing.module.ts:

import { Routes } from '@angular/router';

const routes: Routes = [{ path: 'wiki', loadChildren: './wiki/generated/generated.module#GeneratedModule' }];

Github wiki generation

 ng-git-gen -p "$PWD" -g '' -l

RFC generation

ng-git-gen -p "$PWD" -g '' -l -b 'make html_body' -e '.html' -i "import { NgxPageScrollModule } from 'ngx-page-scroll';" -f '.replace(/href="#/g, `pageScroll href="#`)' -r rfc

Current Tags

  • 0.0.17                                ...           latest (9 months ago)

12 Versions

  • 0.0.17                                ...           9 months ago
  • 0.0.16                                ...           9 months ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (12)
Dev Dependencies (14)
Dependents (0)

Copyright 2014 - 2016 © |