wishthis/node_modules/parse-import
2022-02-23 17:41:13 +01:00
..
index.js Add production dependencies 2022-01-21 09:28:41 +01:00
LICENSE.md Add production dependencies 2022-01-21 09:28:41 +01:00
package.json Update dependencies 2022-02-23 17:41:13 +01:00
README.md Add production dependencies 2022-01-21 09:28:41 +01:00

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