Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaredly/stylecleanup
Find & fix unused styles in react native and aphrodite
https://github.com/jaredly/stylecleanup
Last synced: 14 days ago
JSON representation
Find & fix unused styles in react native and aphrodite
- Host: GitHub
- URL: https://github.com/jaredly/stylecleanup
- Owner: jaredly
- License: mit
- Created: 2017-04-07T20:02:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-10T15:11:36.000Z (almost 5 years ago)
- Last Synced: 2024-10-23T07:52:09.926Z (22 days ago)
- Language: JavaScript
- Homepage:
- Size: 1.39 MB
- Stars: 113
- Watchers: 3
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Style Cleanup
Wouldn't it be nice if you could automatically find & remove unused React
Native and Aphrodite style declarations?`stylecleanup` is here to help!
```bash
$ yarn global add stylecleanup
# or
$ npm install -g stylecleanup
```![screen capture demo](docs/screencap.gif)
## Usage
```
Usage: stylecleanup [command] some/file/to/check.js
command: one of 'check', 'fix', 'fix-force'
globs are also supported, e.g.stylecleanup check './src/**/*.js'
check: find & report missing & unused styles
fix: remove all unused styles, but skip styles that *might* be used, but
can't be verified because e.g. the stylesheet variable is passed around,
or there's a computed property access. If you do 'styles[something]' it
might be accessing anything, so we can't know for sure that apparently
unused styles are actually unused.
fix-force: remove all unnused styles, and all 'potentially' unused styles
```## Contributing
Does this sound interesting to you? Do you want it to do something it doesn't?
Please jump in! I don't have a ton of opinions about this project, so if
there's a change you think should happen, I'm probably down for it. Just file
an issue or make a pull request!