parse-import
Parse CSS @import statements
Last updated 11 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install parse-import 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.0                                ...           latest (10 years ago)

6 Versions

  • 2.0.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.1.3                                ...           10 years ago
  • 0.1.2                                ...           11 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE