Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/visionary-code-works/htmlscssclasschecker
HtmlScssClassChecker is a Ruby gem that streamlines front-end development by identifying unused or unmatched HTML and SCSS classes. It enhances code maintainability and efficiency by providing tools to audit and synchronize class definitions in web projects.
https://github.com/visionary-code-works/htmlscssclasschecker
Last synced: 14 days ago
JSON representation
HtmlScssClassChecker is a Ruby gem that streamlines front-end development by identifying unused or unmatched HTML and SCSS classes. It enhances code maintainability and efficiency by providing tools to audit and synchronize class definitions in web projects.
- Host: GitHub
- URL: https://github.com/visionary-code-works/htmlscssclasschecker
- Owner: Visionary-Code-Works
- License: mit
- Created: 2023-12-20T20:41:39.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-03T23:19:08.000Z (11 months ago)
- Last Synced: 2024-10-08T12:12:46.093Z (about 1 month ago)
- Language: Ruby
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Html Scss Class Checker
[![Gem Version](https://badge.fury.io/rb/html_scss_class_checker.svg)](https://badge.fury.io/rb/html_scss_class_checker)
HtmlScssClassChecker is a Ruby gem for extracting and comparing class names from HTML and SCSS files. It helps in identifying unmatched or unused classes, enhancing the maintainability of front-end codebases.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'html_scss_class_checker'
```And then execute:
```bash
bundle install
```Or install it yourself as:
```bash
gem install html_scss_class_checker
```## Usage
To use HtmlScssClassChecker, you need to set up a configuration JSON file (`config.json`) specifying known classes and directories to be checked:
```json
{
"known_classes": ["class1", "class2"],
"html_directories": ["_includes", "_layouts"],
"scss_directories": ["_sass"]
}
```Run the checker with:
```ruby
require 'html_scss_class_checker'checker = HtmlScssClassChecker::ClassChecker.new(config)
checker.checkputs "Unmatched Classes:"
puts checker.unmatched_classes.to_a
```More detailed usage instructions will be provided in the [Usage Documentation](/docs/usage.md).
## Contributing
Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change. Please ensure to update tests as appropriate.
See [CONTRIBUTING.md](/CONTRIBUTING.md) for detailed guidelines.
## Documentation
For full documentation, visit [our documentation page](/docs).
## License
Distributed under the MIT License. See [LICENSE](/LICENSE) for more information.
## Additional Resources
[![Update Changelog](https://github.com/Visionary-Code-Works/HtmlScssClassChecker/actions/workflows/changelog-update.yml/badge.svg)](https://github.com/Visionary-Code-Works/HtmlScssClassChecker/actions/workflows/changelog-update.yml)
- [Changelog](/CHANGELOG.md): Detailed list of changes in each version.
- [Code of Conduct](/CODE_OF_CONDUCT.md): Guidelines for participation in the community.
- [Development Guide](/docs/development.md): Instructions for setting up a development environment and working on the gem.
- [Testing Guide](/docs/testing.md): Information on how to run and write tests for the gem.
- [Usage Documentation](/docs/usage.md): Provide detailed instructions on how to use the gem, including various configurations and options.
- [Contributing Guidelines](/CONTRIBUTING.md): Outline how others can contribute to your project. Include information on coding standards, pull request processes, and issue reporting guidelines.