mirror of
https://github.com/wishthis/wishthis.git
synced 2025-12-25 08:18:31 -05:00
706 B
706 B
parse-import 
Parse CSS
@importstatements.
Install
$ npm install --save parse-import
Usage
var parseImport = require('parse-import');
var str = [
'@import url("foo.css");',
'@import "bar.css" only screen and (min-width: 25em);'
].join(' ');
parseImport(str);
/*
[{
path: 'foo.css',
condition: '',
rule: '@import url("foo.css")'
}, {
path: 'bar.css',
condition: 'only screen and (min-width: 25em)',
rule: '@import "bar.css" only screen and (min-width: 25em)'
}]
*/
License
MIT © Kevin Mårtensson