{"_id":"rework-npm","_rev":"4538390","name":"rework-npm","description":"Import CSS from npm modules using rework","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2026-04-09T15:04:49.000Z","created":"2013-09-05T18:05:15.688Z","1.0.0":"2014-06-24T20:31:40.411Z","0.7.0":"2014-06-20T22:09:38.195Z","0.6.1":"2014-03-06T17:58:15.879Z","0.6.0":"2014-03-04T02:25:37.672Z","0.5.0":"2014-02-26T03:17:38.742Z","0.4.1":"2014-02-13T20:23:09.576Z","0.4.0":"2014-02-05T03:18:46.912Z","0.3.0":"2013-12-27T20:36:34.489Z","0.2.1":"2013-12-27T17:17:28.029Z","0.2.0":"2013-12-27T16:53:45.607Z","0.1.0":"2013-12-10T16:48:02.667Z","0.0.2":"2013-09-09T18:31:38.852Z","0.0.1":"2013-09-05T18:05:15.688Z"},"users":{},"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"repository":{"type":"git","url":"https://github.com/reworkcss/rework-npm.git"},"versions":{"1.0.0":{"name":"rework-npm","version":"1.0.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/reworkcss/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/reworkcss/rework-npm/issues"},"devDependencies":{"convert-source-map":"^0.3.4","node-sass":"^0.9.3","rework":"^1.0.0","source-map":"^0.1.34","tap":"^0.4.11"},"dependencies":{"concat-map":"^0.0.1","css":"^2.0.0","resolve":"^0.7.1","shallow-copy":"^0.0.1"},"homepage":"https://github.com/reworkcss/rework-npm","_id":"rework-npm@1.0.0","_shasum":"3ef620ffa01d5999479e98e1c64b8864878d8df2","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"3ef620ffa01d5999479e98e1c64b8864878d8df2","size":6304,"noattachment":false,"key":"/rework-npm/-/rework-npm-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-1.0.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:46.007Z","publish_time":1403641900411,"_cnpm_publish_time":1403641900411},"0.7.0":{"name":"rework-npm","version":"0.7.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"^1.0.0","tap":"~0.4.4","node-sass":"^0.8.1"},"dependencies":{"resolve":"~0.6.1","css":"^2.0.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.7.0","_shasum":"7fb231e57221366cea83695ccb9872cfaf230820","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"7fb231e57221366cea83695ccb9872cfaf230820","size":5826,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.7.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:45.134Z","publish_time":1403302178195,"_cnpm_publish_time":1403302178195},"0.6.1":{"name":"rework-npm","version":"0.6.1","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4","node-sass":"^0.8.1"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.6.1","dist":{"shasum":"c27faadfcd8aa09563cdfe2e39672e26fc78bcd4","size":5803,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.6.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.6.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:44.256Z","publish_time":1394128695879,"_cnpm_publish_time":1394128695879},"0.6.0":{"name":"rework-npm","version":"0.6.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4","node-sass":"^0.8.1"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.6.0","dist":{"shasum":"85aeba88f2f950a470d681aadf14ad45e2ff8b4b","size":5820,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.6.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:43.344Z","publish_time":1393899937672,"_cnpm_publish_time":1393899937672},"0.5.0":{"name":"rework-npm","version":"0.5.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.5.0","dist":{"shasum":"9f6e556d02c9353e8bbd4ddcf6ac2e50b7e3f033","size":5605,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.5.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:42.461Z","publish_time":1393384658742,"_cnpm_publish_time":1393384658742},"0.4.1":{"name":"rework-npm","version":"0.4.1","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.4.1","dist":{"shasum":"6540d7d926f091baded06b47e674845e19a1f452","size":5395,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.4.1.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:41.581Z","publish_time":1392322989576,"_cnpm_publish_time":1392322989576},"0.4.0":{"name":"rework-npm","version":"0.4.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.4.0","dist":{"shasum":"b1cedbe2e54b71c6b59f3787e3f4e667e792aef7","size":5356,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.4.0.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:40.695Z","publish_time":1391570326912,"_cnpm_publish_time":1391570326912},"0.3.0":{"name":"rework-npm","version":"0.3.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.3.0","dist":{"shasum":"445cc82e3431f497199f7a818ccf43045db195f4","size":4857,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:39.804Z","publish_time":1388176594489,"_cnpm_publish_time":1388176594489},"0.2.1":{"name":"rework-npm","version":"0.2.1","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.2.1","dist":{"shasum":"6eb374d121bc6d9425bf1a0381b92db44e1daf99","size":4509,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:38.922Z","publish_time":1388164648029,"_cnpm_publish_time":1388164648029},"0.2.0":{"name":"rework-npm","version":"0.2.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.20.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css-parse":"~1.7.0"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.2.0","dist":{"shasum":"b3f3e01e05a243af42711b2ddfef65c87dc2dcea","size":4434,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:38.017Z","publish_time":1388163225607,"_cnpm_publish_time":1388163225607},"0.1.0":{"name":"rework-npm","version":"0.1.0","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.18.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.6.1","css":"~1.4.1"},"homepage":"https://github.com/conradz/rework-npm","_id":"rework-npm@0.1.0","dist":{"shasum":"3a5daac1ef95230477eecd8802a59e05f89aa97e","size":3432,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:37.142Z","publish_time":1386694082667,"_cnpm_publish_time":1386694082667},"0.0.2":{"name":"rework-npm","version":"0.0.2","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.18.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.5.0","css":"~1.4.1"},"_id":"rework-npm@0.0.2","dist":{"shasum":"5dca59d1691dd2023098740b2696504a0c74c7db","size":3084,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:36.257Z","publish_time":1378751498852,"_cnpm_publish_time":1378751498852},"0.0.1":{"name":"rework-npm","version":"0.0.1","description":"Import CSS from npm modules using rework","main":"index.js","scripts":{"test":"tap test.js"},"repository":{"type":"git","url":"https://github.com/conradz/rework-npm.git"},"keywords":["rework","css","style","import","npm","modules"],"author":{"name":"Conrad Zimmerman","email":"me@conradz.com"},"license":"BSD","bugs":{"url":"https://github.com/conradz/rework-npm/issues"},"devDependencies":{"rework":"~0.18.1","tap":"~0.4.4"},"dependencies":{"resolve":"~0.5.0","css":"~1.4.1"},"_id":"rework-npm@0.0.1","dist":{"shasum":"a8341d4508d06e184336f0d34b60df042b2d930a","size":2910,"noattachment":false,"key":"/rework-npm/-/rework-npm-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-npm/download/rework-npm-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"conradz","email":"me@conradz.com"},"maintainers":[{"name":"conradz","email":"me@conradz.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"necolas","email":"nicolasgallagher@gmail.com"},{"name":"slexaxton","email":"alexsexton@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"_cnpmcore_publish_time":"2021-12-21T06:02:35.392Z","publish_time":1378404315688,"_cnpm_publish_time":1378404315688}},"readme":"# rework-npm\n\n[![Build Status](https://travis-ci.org/reworkcss/rework-npm.svg?branch=master)](https://travis-ci.org/reworkcss/rework-npm)\n\nImport CSS styles from NPM modules using\n[rework](https://github.com/reworkcss/rework).\n\nThis lets you use `@import` CSS using the same rules you use for `require` in\nNode. Specify the CSS file for a module using the `style` field in\n`package.json` and use `@import \"my-module\";`, or specify the file name in the\nmodule, like `@import \"my-module/my-file\";`. You can also require files relative\nto the current file using `@import \"./my-file\";`.\n\nAn `@import` will be processed so that the file referenced will have been\nimported in the current scope at the point of the `@import`. If a file has been\npreviously imported in the current scope, that file will not be imported again.\nNew scopes are created in a block such as a `@media` block. Child blocks will\nnot duplicate imports that have been imported in the parent block, but may\nduplicate imports that are imported in a sibling block (since they may not have\neffect otherwise).\n\nYou can use source maps to show which file a definition originated from when\ndebugging in a browser. To include inline source maps, use\n`.toString({ sourcemap: true })` on the rework object when generating the\noutput.\n\nNote that to get correct import paths you must set the `source` option to the\nsource file name when parsing the CSS source (usually with rework). If the\n`source` path is relative, it is resolved to the `root` option (defaults to the\ncurrent directory). The `source` path is used to find the directory to start in\nwhen finding dependencies.\n\n## Example\n\n```js\nvar rework = require('rework'),\n    reworkNPM = require('rework-npm');\n\nvar output = rework('@import \"test\";', { source: 'my-file.css' })\n    .use(reworkNPM())\n    .toString();\n\nconsole.log(output);\n```\n\n## Reference\n\n### `reworkNPM([opts])`\n\nCreates a new plugin for rework that will import files from NPM.\n\n## Options\n\n### root\nThe root directory for the source files. This is used for source maps to make\nimported file names relative to this directory, and for finding the absolute\npath for the top level source file.\n\nExample:\n\n```js\n// Uses `<dir>/src/index.css` as the file path for the top level file. Also all\n// file paths in the source map will be relative to the `<dir>/src` folder.\nrework('@import \"./abc\";', { source: 'index.css' })\n    .use(reworkNPM({ root: path.join(__dirname, 'src') }))\n    .toString();\n```\n\n### shim\nIf you need to import packages that do not specify a `style` property in their\n`package.json` or provide their styles in `index.css`, you can provide a shim\nconfig option to access them. This is specified as a hash whose keys are the\nnames of packages to shim and whose values are the path, relative to that\npackage's `package.json` file, where styles can be found.\n\nExample:\n\n```js\n// Imports the `dist/leaflet.css` file from the `leaflet` package\nrework('@import \"leaflet\";', { source: 'index.css' })\n    .use(reworkNPM({ shim: { 'leaflet': 'dist/leaflet.css' } }))\n    .toString();\n```\n\n### alias\n\nYou can provide aliases for arbitrary import paths, including files and\ndirectories. When importing a file, it will search all directories in the path\nfor aliases also. Note that relative imports are never aliased.\n\nThis is specified as an object where the keys are the name of the import path to\nalias, and the values are the file or directory path for the destination,\nrelative to the `root` option.\n\nExample:\n\n```js\n// Imports the `styles/util.css` file\nrework('@import \"util\";', { source: 'index.css' })\n    .use(reworkNPM({ alias: { 'util': 'styles/util.css' } }))\n    .toString();\n```\n\n```js\n// Imports the `styles/index.css` file if there is a `styles` directory,\n// otherwise the `styles.css` file.\nrework('@import \"util\";', { source: 'index.css' })\n    .use(reworkNPM({ alias: { 'util': 'styles' } }))\n    .toString();\n```\n\n```js\n// Imports the `styles/other.css` file\nrework('@import \"util/other\";', { source: 'index.css' })\n    .use(reworkNPM({ alias: { 'util': 'styles' } }))\n    .toString();\n```\n\n### prefilter\nA function that will be called before an imported file is parsed. This function\nwill be called with the file contents and the full file path. This option can be\nused to convert other languages such as SCSS to CSS before importing.\n\nExample:\n\n```js\n// Process SCSS files\nrework('@import \"./some-file.scss\";', { source: 'index.css' })\n    .use(reworkNPM({ prefilter: compile }))\n    .toString();\n\nfunction compile(src, file) {\n    if (path.extname(file) === '.scss') {\n        return compileScss(src);\n    }\n\n    return src;\n}\n```\n","_attachments":{},"homepage":"https://github.com/reworkcss/rework-npm","bugs":{"url":"https://github.com/reworkcss/rework-npm/issues"},"license":"BSD"}