Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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

Keywords

none

install

npm i css-md5

Downloadsweekly downloads

0

version

0.0.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability