Skip to content

CLI utility for generating a standardized folder structure for Angular projects, following best practice architecture.

License

Notifications You must be signed in to change notification settings

FlorianBx/ng-angular-structure-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ng-angular-structure-cli

Folder structure generator for Angular projects, automatically organizing components, services, guards, and other elements into a modular and maintainable architecture.

Quick Usage

If you don't want to install the script, just copy and run this command in your Angular project:

mkdir -p src/app/{core/{guards,interceptors,interfaces,services},features/{navbar,header,footer},pages/{admin,home,login,"not-found"},shared/{components,directives,pipes}}

Installation

git clone https://github.com/FlorianBx/ng-angular-structure-cli.git

MacOS Setup

BASH & ZSH
  1. Add alias to your shell config (~/.zshrc or ~/.bashrc):
mkdir -p ~/bin
cp ng-struct.sh ~/bin/ng-struct.sh
chmod +x ~/bin/ng-struct.sh
echo 'alias ng-struct="~/path/to/ng-angular-structure-cli/create-structure.sh"' >> ~/.zshrc
  1. Reload your shell config:
source ~/.zshrc
FISH 1. Add alias to your shell config (config.fish): ```bash mkdir -p ~/bin cp ng-struct.sh ~/bin/ng-struct.sh chmod +x ~/bin/ng-struct.sh echo 'alias ng-struct="~/bin/ng-struct.sh"' >> ~/.config/fish/config.fish ```
  1. Reload your shell config:
source ~/.zshrc

Windows Setup

Open to contributions!

BASH & ZSH
  1. Add alias to your shell config (~/.zshrc or ~/.bashrc):
mkdir -p ~/bin
cp ng-struct.sh ~/bin/ng-struct.sh
chmod +x ~/bin/ng-struct.sh
echo 'alias ng-struct="~/path/to/ng-angular-structure-cli/create-structure.sh"' >> ~/.zshrc
  1. Reload your shell config:
source ~/.zshrc

Usage

In your Angular project root directory:

ng-struct

Generated Structure

src/
└── app/
    β”œβ”€β”€ core/
    β”‚   β”œβ”€β”€ guards/
    β”‚   β”œβ”€β”€ interceptors/
    β”‚   β”œβ”€β”€ interfaces/
    β”‚   └── services/
    β”œβ”€β”€ features/
    β”‚   β”œβ”€β”€ navbar/
    β”‚   β”œβ”€β”€ header/
    β”‚   └── footer/
    β”œβ”€β”€ pages/
    β”‚   β”œβ”€β”€ admin/
    β”‚   β”œβ”€β”€ home/
    β”‚   β”œβ”€β”€ login/
    β”‚   └── not-found/
    └── shared/
        β”œβ”€β”€ components/
        β”œβ”€β”€ directives/
        └── pipes/

License

MIT

About

CLI utility for generating a standardized folder structure for Angular projects, following best practice architecture.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages