angular-architecture

Enforce Angular project architecture with component scoping and file naming conventions.

2|Updated Jan 5, 2024
One-click install
npx skills add https://github.com/wilfriedago/dotfiles --skill angular-architecture-wilfriedago
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-architecture
Source: https://github.com/wilfriedago/dotfiles/tree/main/agents/skills/angular-architecture
Command: npx skills add https://github.com/wilfriedago/dotfiles --skill angular-architecture-wilfriedago

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a clear and consistent approach to structuring Angular projects, ensuring maintainability and scalability by defining rules for component placement, file naming, and overall project organization.

Core Features & Use Cases

  • Scope Rule: Organizes components based on their usage (feature-specific vs. shared).
  • Project Structure: Outlines a standard directory layout for Angular applications.
  • File Naming Convention: Enforces concise file names by omitting redundant suffixes like .component or .service.
  • Style Guide Adherence: Promotes best practices from the official Angular documentation and defines overrides for consistency.
  • Command Generation: Provides helpful ng commands for scaffolding new projects and components.

Quick Start

Use the angular-architecture skill to generate a new Angular component named 'user-profile' within the 'features/users' directory.

Frequently Asked Questions about angular-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to structure an Angular project for maintainability?

Structuring an Angular project involves organizing components by scope, using a standard directory layout, and omitting redundant suffixes like `.component` in file naming conventions. This approach enforces best practices to ensure long-term scalability.

How do I organize Angular components based on their usage scope?

Organize Angular components using a scope rule that separates feature-specific components from shared components. This establishes a clear directory structure, guiding developers on exactly where to place code for optimal maintainability.

Should Angular file naming conventions include the .component suffix?

Angular file naming conventions should omit redundant suffixes like `.component` or `.service`. Enforcing concise file names reduces clutter and maintains consistency across the project directory layout.

How do I generate a new Angular component within a specific feature directory?

Generate a new Angular component within a specific feature directory using provided `ng` commands. These commands scaffold the project structure while automatically adhering to the defined style guide and file naming rules.

Does this Angular architecture approach follow the official style guide?

This Angular architecture approach promotes best practices from the official Angular documentation. It defines specific overrides for consistency, ensuring project structure and component organization align with established style guide standards.

When do I need to define a standard directory layout for an Angular application?

Define a standard directory layout for an Angular application when project scalability and maintainability become critical. Outlining the structure early prevents code organization issues and enforces consistent component scoping.