css-image-checker
v1.11.0
Published
Checks if all images in CSS files exists
Downloads
6,538
Maintainers
Readme
css-image-checker
Checks if all images in a local CSS file exists
What does it do?
css-image-checker can check CSS files for invalid referenced images
Usage
npm install -g css-image-checker
css-image-checker --folder '/www-folder'
Example
Consider the following code:
#logo a {
background: url(logo.png) no-repeat -42px -271px;
}
but you only have logo.jpg
image available.
Running css-image-checker --folder '/www-folder'
The output will be:
Error found in: style.css
Full path not found: /www-folder/logo.png
Path in CSS file: logo.png
Number of errors: 1
Exit codes
0 = No errors
1 = Errors were founds in the CSS files
2 = No folder were specified on command line
3 = Folder specified does not exists
4 = Folder specified is not a folder
Continuous Integration
css-image-checker can be used in CI environments to check your CSS files before merging a pull request