https://github.com/coryrylan/selector-reporter
A simple library to help report deprecated attributes or CSS classes in your html.
https://github.com/coryrylan/selector-reporter
Last synced: over 1 year ago
JSON representation
A simple library to help report deprecated attributes or CSS classes in your html.
- Host: GitHub
- URL: https://github.com/coryrylan/selector-reporter
- Owner: coryrylan
- License: mit
- Created: 2015-02-13T20:04:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-13T21:27:25.000Z (over 11 years ago)
- Last Synced: 2025-01-22T00:46:28.124Z (over 1 year ago)
- Language: JavaScript
- Size: 902 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#Selector Reporter
A simple library to help report deprecated attributes or CSS classes in your html.

```javascript
selectorReporter.run({
//production: true, // Optional if wanting to run outside of localhost
prefix: 'mywebsite.com', // Optional if messages should be prefixed
messages: [
{ selector: '.button', message: 'is deprecated please use .btn', level: 'warning' },
{ selector: '.floatLeft' }
]
});
```
Messages is an array of objects containing three properties `selector`, `message` and `level`.
`selectorReporter` will find the given `selector` to determine if it exists and display the `message`.
There are four `level` types, 'error', 'warning', 'info', and 'log'. If a level is not specified
the default is 'warning'.