Ngf Angular Files Extension
A Visual Studio Code (VSCode) extension for quickly generating Angular files and renaming components.
Features
- Quick scaffolding with predefined templates.
- Rename components and all associated files to component, including import paths, and class names for consistency.
- Supports
angular.json configuration for prefix and style file extension.
Usage:
- Right-click a folder for file generation.
- Right-click on
.component.ts file for renaming.
Commands and Generated Files
Component Inline:
- file.
component.ts single file (standalone: true).
Component:
- file.
component.ts (standalone: true).
- file.
component.html
- file.
component.scss/css/less/sass
index.ts
Module:
- file.
module.ts
- file.
component.ts (declared in module).
- file.
component.html
- file.
component.scss/css/less/sass
- file.
service.ts (provided in module).
index.ts
Service:
- file.
service.ts (provided in root).
Directive:
- file.
directive.ts (standalone: true).
Model:
Enum:
Interface:
angular.json support
...
"projects": {
"my-project": {
...
"schematics": {
"@schematics/angular:component": {
...
"style": "css|scss|sass|less", <-------
...
},
},
...
"prefix": "my-app", <-------
...
}
}
...
Issues
If you encounter any problems or have a suggestion, please open an issue on GitHub.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Enjoy your coding! 😉
| |