|
|
8 年 前 | |
|---|---|---|
| .. | ||
| README.md | 8 年 前 | |
| index.js | 8 年 前 | |
| package.json | 8 年 前 | |
Parse CSS
@importstatements.
$ npm install --save parse-import
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)'
}]
*/
MIT © Kevin Mårtensson