A command-line tool for comparing two CSS files and highlighting their differences.
- Compare two CSS files and show added/removed lines
- Provide a summary of changes
- Generate a full diff report
- Handle invalid CSS files gracefully
- Easy to use command-line interface
To install the CSS Comparison Tool globally, run:
npm install -g css-comparison-tool
After installation, you can use the tool from the command line:
css-compare <file1.css> <file2.css> [options]
--full-report
: Generate a full diff report file
Compare two CSS files:
css-compare styles1.css styles2.css
Compare two CSS files and generate a full report:
css-compare styles1.css styles2.css --full-report
The tool provides:
- A summary of added and removed lines
- A colorized diff of the changes (limited to the first 100 lines by default)
- An option to generate a full diff report file
The tool gracefully handles various error scenarios:
- Non-existent files
- Invalid CSS syntax
- Parsing errors
In case of errors, appropriate error messages will be displayed.
To set up the project for development:
- Clone the repository
- Run
npm install
to install dependencies - Use
npm test
to run the test suite
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.