Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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/project

Options:
-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.