JSPM

resolve-css-import-urls

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5814
  • Score
    100M100P100Q128463F
  • License MIT

Turn CSS @import statements into full urls

Package Exports

  • resolve-css-import-urls

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resolve-css-import-urls) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Resolve CSS Import Urls

Build Status

Parse CSS import statements (@import url(bar.css)) in a string and return the full urls (http://foo.com/bar.css).

Installation

npm i --save resolve-css-import-urls

Usage

var resolveCssImportUrls = require('resolve-css-import-urls');

resolveCssImportUrls("url(foo.css); lksjhlksjhdf url(bar.css);")
// => ["foo.css", "bar.css"]

resolveCssImportUrls("(foo.css); lksjhlksjhdf") // => []

License

MIT

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with <3 by John Otander.