Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BernardoGiordano/ngx-stylesweep
A CLI tool that removes empty style files from your Angular components.
https://github.com/BernardoGiordano/ngx-stylesweep
angular angular18 angular2 cleanup empty styles stylesheets
Last synced: 24 days ago
JSON representation
A CLI tool that removes empty style files from your Angular components.
- Host: GitHub
- URL: https://github.com/BernardoGiordano/ngx-stylesweep
- Owner: BernardoGiordano
- License: mit
- Created: 2024-07-07T14:59:02.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-14T06:08:20.000Z (5 months ago)
- Last Synced: 2024-11-14T11:28:23.342Z (28 days ago)
- Topics: angular, angular18, angular2, cleanup, empty, styles, stylesheets
- Language: TypeScript
- Homepage:
- Size: 108 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular - ngx-stylesweep - A CLI tool that removes empty style files from your Angular components. (Table of contents / Angular)
- fucking-awesome-angular - ngx-stylesweep - A CLI tool that removes empty style files from your Angular components. (Table of contents / Angular)
README
# ngx-stylesweep
`ngx-stylesweep` is a command-line tool that removes empty style files from your Angular components.
## Support
This tool traverses your Angular project's source directory, identifies Angular components with style files, and deletes
any style files that are
empty. It also updates the respective component files to remove references to the deleted style files.This tool comes with support for Angular `@Component`'s `styleUrl` and `styleUrls` attribute.
Support for other style attributes, if available, will come soon.## Installation
Install `ngx-stylesweep` globally using npm:
```bash
npm install -g @bernardogiordano/ngx-stylesweep
```## Usage
To use `ngx-stylesweep`, run the following command in your project's root directory:
```bash
ngx-stylesweep -p /path/to/your/angular/projectOptions:
-V, --version output the version number
-p, --path Path to the root source directory (default: ".")
-d, --dry-run Dry run (no changes will be made) (default: false)
-y, --yes Automatically apply changes (default: false)
-v, --verbose Verbose output (default: false)
-h, --help display help for command
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
`ngx-stylesweep` is licensed under the MIT License.