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).

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    2

Package Sidebar

Install

npm i css-md5

Weekly Downloads

2

Version

0.0.1

License

BSD

Last publish

Collaborators

  • randometc