Miss any of our Open RFC calls?Watch the recordings here! »

css-image-checker

1.0.8 • Public • Published

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

Badges

CircleCI

codecov

Total alerts

Install

npm i css-image-checker

DownloadsWeekly Downloads

5

Version

1.0.8

License

MIT

Unpacked Size

188 kB

Total Files

22

Last publish

Collaborators

  • avatar