You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 706B

12345678910111213141516171819202122232425262728293031323334353637
  1. # parse-import [![Build Status](http://img.shields.io/travis/kevva/parse-import.svg?style=flat)](https://travis-ci.org/kevva/parse-import)
  2. > Parse CSS `@import` statements.
  3. ## Install
  4. ```sh
  5. $ npm install --save parse-import
  6. ```
  7. ## Usage
  8. ```js
  9. var parseImport = require('parse-import');
  10. var str = [
  11. '@import url("foo.css");',
  12. '@import "bar.css" only screen and (min-width: 25em);'
  13. ].join(' ');
  14. parseImport(str);
  15. /*
  16. [{
  17. path: 'foo.css',
  18. condition: '',
  19. rule: '@import url("foo.css")'
  20. }, {
  21. path: 'bar.css',
  22. condition: 'only screen and (min-width: 25em)',
  23. rule: '@import "bar.css" only screen and (min-width: 25em)'
  24. }]
  25. */
  26. ```
  27. ## License
  28. MIT © [Kevin Mårtensson](https://github.com/kevva)