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

Parse css import statements (@import url(bar.css)) in a string and return the full urls (http://foo.com/bar.css).
Support for the following @import syntax:
@import url("fineprint.css") print;
@import 'custom.css' projection;
@import "custom.css";TODO: Support the following
@import "common.css" screen, projection;
@import url('landscape.css') screen and (orientation:landscape);
@import url("bluish.css") projection, tv;Installation
npm i --save resolve-css-import-urlsUsage
const resolveCssImportUrls = require('resolve-css-import-urls')
resolveCssImportUrls('http://example.com/css', 'url(foo.css); lksjhlksjhdf url(../bar.css);')
// => ['http://example.com/css/foo.css', 'http://example.com/bar.css']
resolveCssImportUrls("(foo.css); lksjhlksjhdf") // => []License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Crafted with <3 by John Otander.
This package was initially generated with yeoman and the p generator.