{"name":"sass-module-importer","version":"1.0.1","main":"lib/index.js","description":"Import Sass files from NPM and Bower Modules","author":{"name":"Lucas Motta","email":"mail@lucasmotta.com","url":"lucasmotta.com"},"repository":{"type":"git","url":"git+https://github.com/lucasmotta/sass-module-importer.git"},"bugs":{"url":"https://github.com/lucasmotta/sass-module-importer/issues"},"license":"MIT","keywords":["sass","scss","importer","module","npm","node-sass","bower"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha --compilers js:babel/register","compile":"babel -d lib/ src/","pretest":"eslint src/index.js test.js","preversion":"npm test","prepublish":"npm test && npm run compile","postpublish":"git push"},"devDependencies":{"babel-eslint":"^3.1.20","chai":"^3.0.0","mocha":"^2.2.5","node-sass":"^3.2.0","sass-easing":"^1.0.3"},"dependencies":{"babel":"^5.6.14","resolve":"^1.1.6","resolve-bower":"0.0.1"},"gitHead":"da7c5e23aaae6832f5cfc2d72ee52d6a7369a752","homepage":"https://github.com/lucasmotta/sass-module-importer#readme","_id":"sass-module-importer@1.0.1","_shasum":"b2df4e56f56bc8ef13f91ed6bdb49ceef4361ebb","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"lucasmotta","email":"mail@lucasmotta.com"},"maintainers":[{"name":"lucasmotta","email":"mail@lucasmotta.com"}],"dist":{"shasum":"b2df4e56f56bc8ef13f91ed6bdb49ceef4361ebb","tarball":"http://registry-npm.ywwl.com/sass-module-importer/download/sass-module-importer-1.0.1.tgz","integrity":"sha512-hjV33NGAa4pl0Tk6HqpKskXjnjJk+o7XBA5TlXE0ILOwo0GxE9JY/fW0KK4iaYrSfchSRWUkWcYPJmJ223NSqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDtVxwy14/9tbbE8XUsorjdkd18xmb+B8d8oVfU0SW5AiBPXpIBt0HvQY7VQqHH23uiB6EQxau849ytSQlLsn0u/w=="}],"size":10087,"noattachment":false,"key":"/sass-module-importer/-/sass-module-importer-1.0.1.tgz"},"directories":{},"readme":"[![Build Status](https://travis-ci.org/lucasmotta/sass-module-importer.svg?branch=master)](https://travis-ci.org/lucasmotta/sass-module-importer)\n\n# sass-module-importer\n\nSimple importer for [node-sass](https://github.com/sass/node-sass) to import [npm](https://www.npmjs.com) and [bower](http://bower.io/search/) modules.\n\nSay good-bye to all the mess with relative paths on your Sass files.  \nYou can now import your Sass/SCSS modules by referencing to the module name, like this:\n\n```sass\n@import \"sass-easing\";\n@import \"quantum-colors\";\n@import \"inuit-defaults\";\n@import \"inuit-functions\";\n@import \"inuit-mixins\";\n@import \"inuit-box-sizing\";\n@import \"inuit-normalize\";\n@import \"inuit-page\";\n// :)\n```\n\nJust for comparison, look at this mess:\n\n```sass\n@import \"node_modules/sass-easing/_easings.scss\";\n@import \"bower_components/quantum-colors/_quantum-colors.scss\";\n@import \"bower_components/inuit-defaults/settings.defaults\";\n@import \"bower_components/inuit-functions/tools.functions\";\n@import \"bower_components/inuit-mixins/tools.mixins\";\n@import \"bower_components/inuit-normalize/generic.normalize\";\n@import \"bower_components/inuit-box-sizing/generic.box-sizing\";\n@import \"bower_components/inuit-page/base.page\";\n// :(\n```\n\nAssuming that the external library you are installing fits under one of those categories:\n\n1. Set a SCSS/Sass/CSS file on the \"main\" field of their package.json/bower.json\n2. Set a SCSS/Sass/CSS file on the \"style\" field of their package.json/bower.json\n3. Have a `index.css` file on the root of their module\n\nThis tool it will also inline CSS files for you, since Sass [cannot import plain CSS files yet](https://github.com/sass/sass/issues/556). So if the dependency you are using exports a CSS file, it will work too.\n\n\n## How-to\n\n### install\n\n```sh\nnpm install sass-module-importer --save-dev\n```\n\n### use the importer with [node-sass](https://github.com/sass/node-sass) `>= v3.0.0`\n\n```js\nimport sass from 'node-sass';\nimport moduleImporter from 'sass-module-importer';\n\nsass.render({\n  file: './source/css/app.scss',\n  importer: moduleImporter()\n}, cb);\n```\n\n### use the importer with [gulp-sass](https://github.com/dlmanning/gulp-sass)\n\n```js\nimport gulp from 'gulp';\nimport sass from 'gulp-sass';\nimport moduleImporter from 'sass-module-importer';\n\ngulp.task('style', () => {\n  return gulp.src('./source/css/app.scss')\n    .pipe(sass({ importer: moduleImporter() }))\n    .pipe(gulp.dest('./public/css'));\n});\n```\n\n### import partials\n\nIf you need to import partials from your external module, just use the path for the partial you want to import. To import the following file:\n```\nnode_modules/module-name/folder/to/_file.scss\n```\n\nImport like this anywhere:\n\n```scss\n@import \"module-name/folder/to/_file.scss\"\n```\n\n## Options\nYou can pass any option supported by [node-resolve](https://github.com/substack/node-resolve#resolveid-opts-cb) directly, like this:\n```js\nmoduleImporter({ basedir: path.join(__dirname, 'another-folder') });\n```\n\n## Tests\nUse `npm test` to run the tests.\n\n## Issues\nIf you discover a bug, please raise an issue on Github. https://github.com/lucasmotta/sass-module-importer/issues\n\n## Contributors\nThe source code and the test are written in ES6 (ECMAScript 2015).  \n[Buble](https://gitlab.com/Rich-Harris/buble) is being used to compile to ES5 before the package is published to npm.\n","publish_time":1436180412827,"_cnpm_publish_time":1436180412827,"dist-tags":{"latest":"1.4.0"}}