parse-import

2.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    28,848
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    28,848
  • 1.0.0
    515
  • 0.1.3
    922
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i parse-import

Weekly Downloads

30,285

Version

2.0.0

License

MIT

Last publish

Collaborators

  • kevva