The project is in a healthy, maintained state
HtmlScssClassChecker is designed to streamline the process of frontend development by scanning HTML and SCSS files and identifying classes that are either undefined or unused. This gem aims to facilitate cleaner, more maintainable, and efficient codebases by providing developers with the tools to easily audit and synchronize their HTML and SCSS class definitions. Its an essential tool for web developers looking to optimize their front-end code and ensure consistency across their stylesheets and markup.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0

Runtime

>= 0
 Project Readme

Html Scss Class Checker

Gem Version

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:

gem 'html_scss_class_checker'

And then execute:

bundle install

Or install it yourself as:

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:

{
  "known_classes": ["class1", "class2"],
  "html_directories": ["_includes", "_layouts"],
  "scss_directories": ["_sass"]
}

Run the checker with:

require 'html_scss_class_checker'

checker = HtmlScssClassChecker::ClassChecker.new(config)
checker.check

puts "Unmatched Classes:"
puts checker.unmatched_classes.to_a

More detailed usage instructions will be provided in the Usage Documentation.

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 for detailed guidelines.

Documentation

For full documentation, visit our documentation page.

License

Distributed under the MIT License. See LICENSE for more information.

Additional Resources

Update Changelog

  • Changelog: Detailed list of changes in each version.
  • Code of Conduct: Guidelines for participation in the community.
  • Development Guide: Instructions for setting up a development environment and working on the gem.
  • Testing Guide: Information on how to run and write tests for the gem.
  • Usage Documentation: Provide detailed instructions on how to use the gem, including various configurations and options.
  • Contributing Guidelines: Outline how others can contribute to your project. Include information on coding standards, pull request processes, and issue reporting guidelines.