parse-import

Parse CSS @import statements

MIT 6 个版本
安装
npm install parse-import
yarn add parse-import
pnpm add parse-import
bun add parse-import
README

parse-import Build Status

Parse CSS @import statements.

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

版本列表
2.0.0 2014-11-26
1.0.0 2014-08-31
0.1.3 2014-06-12
0.1.2 2014-04-23
0.1.1 2014-02-24
0.1.0 2014-02-24