rework-plugin-url
url() plugin for rework, formerly included in core
Last updated 5 years ago by conradz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rework-plugin-url 
SYNC missed versions from official npm registry.

rework-plugin-url

Build Status

Map url() calls. Replace all url()s using a given function.

var css = rework(read(css))
  .use(rework.url(function(url){
    return 'http://example.com' + url;
  }))
  .toString()
body {
  background: url(/images/bg.png);
}

yields:

body {
  background: url(http://example.com/images/bg.png);
}

Current Tags

  • 1.1.0                                ...           latest (5 years ago)

4 Versions

  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.9.0                                ...           6 years ago

Copyright 2014 - 2016 © taobao.org |