/ng-cli-template

costumizing angular-cli generator templates

Primary LanguageJavaScript

Basically, my customized Angular CLI templates.

That's not the best practice to follow but the easiest/fastest clue for now; may evolve it later

Setup

Requirements

Install

  • npm i (this will trigger build.sh)

Use collections

  • ng new --collection=@custom/$COLLECTION_DIR_NAME $PROJECT_NAME

Overwriting the original template

Basically, you make sure angular-cli is installed, clone me & overwrite @schematics/angular, e.g:

GLOBAL_NODEJS_PACKAGES=$(npm root -g)

cp -R $COLLECTION \
$GLOBAL_NODEJS_PACKAGES/@angular/cli/node_modules/@schematics/angular

Creating a new collection

You can alter only the changed files from the default template at $(npm root -g)/@schematics/angular, save then in a new directory and add it to the list array in build.sh

ref: