css-md5

0.0.1 • Public • Published

css-md5

Walks CSS files and replaces contents of url() dependencies with paths to a CDN.

$ CDN_PREFIX="/" CDN_URL="https://my-cdn-url.cloudfront.net" ./bin/cssmd5.js public/test.css
#test{background:url("https://my-cdn-url.cloudfront.net/d41d8cd98f00b204e9800998ecf8427e/images/foo.png");}.other{background-image:url("https://my-cdn-url.cloudfront.net/d41d8cd98f00b204e9800998ecf8427e/images/bar.gif");}

Useful in conjunction with RandomEtc/css-deps and some judicious Makefiles.

Also includes some code for rewriting link/script URLs in Express templates, not wired up yet (TODO).

Dependents (0)

Package Sidebar

Install

npm i css-md5

Weekly Downloads

0

Version

0.0.1

License

BSD

Last publish

Collaborators

  • randometc