Skip to content

Instantly share code, notes, and snippets.

@beeman
Created April 9, 2020 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beeman/cec3bd9c0e106e28202a5383af67841c to your computer and use it in GitHub Desktop.
Save beeman/cec3bd9c0e106e28202a5383af67841c to your computer and use it in GitHub Desktop.

Installation:

  • download generate-app.sh
  • Give permissions: chmod +x generate-app.sh

Usage:

  • cd /tmp
  • generate-app.sh <app-name>
# Read variables
export APP_NAME="$1"
# Generate app
ng new "${APP_NAME}" \
--style scss \
--routing
# Generate modules
cd "${APP_NAME}"
# General components
ng g m components
ng g c components/footer
ng g c components/header
ng g c components/sidebar
# Blog
ng g m pages/blog
ng g c pages/blog/stories
ng g c pages/blog/travels
# About
ng g m pages/about
ng g c pages/about/about
# Home
ng g m pages/home
ng g c pages/home/home
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment