@ng-zen/cli v19.3.0
@ng-zen/cli
Generate modern, customizable Angular UI components and elements directly into your project π
Built with the best practices and developer experience in mind π‘
Table of Contents
- Features
- Ideal for
- Quick Start
- Installation
- Usage
- Why @ng-zen/cli?
- Examples
- Documentation
- Project Status
- Contributing
- License
- Author
- See also
- FAQ
Features
- π§© Component Schematics: Generates ready-to-use UI component code (
.ts,.html,.scss). - π¨ Fully Customizable: Easily theme and modify components via CSS variables and editable SCSS.
- π± Responsive Design: Components designed to adapt across various screen sizes.
- π Comprehensive Documentation: Includes Storybook examples, JSDoc annotations, and
README.mdper component. - β
Test Coverage: Generated components include unit tests (
.spec.ts). - π Modern Angular: Leverages standalone components,
OnPushchange detection, signals, and current best practices. - π Extensible: Planned support for generating directives, pipes, services, and more.
Ideal for
- π’ Enterprise UI Kits: A great starting point for building consistent, internal component libraries.
- π Custom Projects: Accelerates development when custom UI elements are needed, avoiding vendor lock-in.
- π©βπ» Developers: Speeds up UI creation and ensures adherence to modern Angular patterns.
Quick Start
The easiest way to add @ng-zen/cli and its schematics to your project:
ng add @ng-zen/cliThis command installs the package and performs initial setup.
Installation
Alternatively, you can install it manually:
# For the latest stable version
pnpm add -D @ng-zen/cli
# For the latest pre-release version (includes newest features/fixes)
pnpm add -D @ng-zen/cli@nextUsage
Generating Components
Use the Angular CLI schematic:
ng generate @ng-zen/cli:componentThis interactive prompt guides you through selecting and configuring the desired component(s) π.
To see available options without running interactively:
ng generate @ng-zen/cli:component --helpFuture Generators
Support for generating other Angular building blocks is planned:
- π Directives
- π§ Pipes
- π Services
- ... and more!
Why @ng-zen/cli?
Unlike pre-compiled UI libraries, @ng-zen/cli:
- Generates Source Code: You get actual, editable component code in your project, not opaque
<library-button>tags. - Full Control: Modify the generated code and styles freely to perfectly match your application's needs.
- Modern Foundation: Built on current Angular features (standalone, signals, etc.).
- Transparency: Understand exactly how components work and evolve them with your project.
- Developer Experience: Focuses on ease of use, customization, and maintainability.
Examples
Each generated component set includes:
- Angular component code (
.ts,.html,.scss) - Unit tests (
.spec.ts) - Storybook stories (
.stories.ts) for visual development and documentation. - An
index.tsfor easy exporting. - A component-specific
README.md(generated from a template).
Documentation
- Storybook: The primary source for visual examples and interactive demos: View Storybook Demo
- JSDoc: Code includes documentation comments.
- READMEs: Project-level (
README.md,DEVELOPMENT.md,CONTRIBUTING.md) and component-level READMEs. - Changelog: Automatically generated history of changes: CHANGELOG.md
Project Status
π§ Actively Developed π§
- The core schematics and existing components are functional but continuously improved.
- New generators (directives, pipes, etc.) are planned.
- The
masterbranch represents the latest stable release. - The
nextbranch contains pre-release versions with the newest features and fixes β use@ng-zen/cli@nextto try them out.
Since the tool generates code directly into your project, you own and control that code. Updates to @ng-zen/cli itself primarily bring new generator features or improvements to the generation process, not breaking changes to already generated components.
Contributing
Contributions are highly welcome! If you'd like to help improve @ng-zen/cli, please read our Contribution Guidelines (CONTRIBUTING.md) for details on the workflow, commit message requirements, and setup. π€
License
This project is licensed under the BSD 2-Clause License π.
Author
Maintained by Konrad StΔpieΕ.
- GitHub: @kstepien3
- LinkedIn: Konrad StΔpieΕ π₯
- Email: kord.stp@gmail.com π¨
See also
- ngx-schematic-builder - A custom Angular builder for compiling and bundling Angular schematics.
FAQ
How do I customize a generated component?
Generated components reside entirely within your project's source code. You can directly edit the .ts, .html, and .scss files. Components are structured to use CSS variables and SCSS for easier theming and modification.
6 months ago
6 months ago
6 months ago
7 months ago
6 months ago
8 months ago
6 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
8 months ago
6 months ago
6 months ago
1 year ago