{"action":"created","issue":{"url":"https://api.github.com/repos/davidguttman/sassify/issues/37","repository_url":"https://api.github.com/repos/davidguttman/sassify","labels_url":"https://api.github.com/repos/davidguttman/sassify/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/davidguttman/sassify/issues/37/comments","events_url":"https://api.github.com/repos/davidguttman/sassify/issues/37/events","html_url":"https://github.com/davidguttman/sassify/issues/37","id":164410514,"number":37,"title":"Import from npm install files","user":{"login":"konsumer","id":83857,"avatar_url":"https://avatars.githubusercontent.com/u/83857?v=3","gravatar_id":"","url":"https://api.github.com/users/konsumer","html_url":"https://github.com/konsumer","followers_url":"https://api.github.com/users/konsumer/followers","following_url":"https://api.github.com/users/konsumer/following{/other_user}","gists_url":"https://api.github.com/users/konsumer/gists{/gist_id}","starred_url":"https://api.github.com/users/konsumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konsumer/subscriptions","organizations_url":"https://api.github.com/users/konsumer/orgs","repos_url":"https://api.github.com/users/konsumer/repos","events_url":"https://api.github.com/users/konsumer/events{/privacy}","received_events_url":"https://api.github.com/users/konsumer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-07T21:23:15Z","updated_at":"2016-07-07T21:54:40Z","closed_at":null,"body":"I would like to be able to import from other projects in node_modules at runtime, using my npm path. The problem is when I have a module installed alongside other modules that are it's dependencies (as with modern version of npm) and so I can't count on the structure of node_modules.\r\n\r\nIt would turn things like this:\r\n\r\n```scss\r\n@import \"../../../node_modules/material-colors/dist/colors.scss\";\r\n```\r\n\r\nwhich breaks if the module is installed alongside material-colors. The path that would work in that case, but not standalone woud look like this:\r\n\r\n```scss\r\n@import \"../../../../material-colors/dist/colors.scss\";\r\n```\r\n\r\nIf there was even a way to count on the node_modules dir in a variable, and I could do something like this, it would work ok, even if not ideal:\r\n\r\n```scss\r\n@import $module_path + \"material-colors/dist/colors.scss\";\r\n```\r\n\r\nI'd prefer to be able to do something like this:\r\n\r\n```scss\r\n@import \"material-colors/dist/colors.scss\";\r\n```\r\nless/lessify works this way.\r\n\r\n[This module](https://www.npmjs.com/package/sass-module-importer) gets close, but has requirements to setup package.json with the right structure. I made [an issue](https://github.com/lucasmotta/sass-module-importer/issues/17) that tracks that, so maybe it will be as simple as adding that module to the node-sass options.\r\n"},"comment":{"url":"https://api.github.com/repos/davidguttman/sassify/issues/comments/231219081","html_url":"https://github.com/davidguttman/sassify/issues/37#issuecomment-231219081","issue_url":"https://api.github.com/repos/davidguttman/sassify/issues/37","id":231219081,"user":{"login":"konsumer","id":83857,"avatar_url":"https://avatars.githubusercontent.com/u/83857?v=3","gravatar_id":"","url":"https://api.github.com/users/konsumer","html_url":"https://github.com/konsumer","followers_url":"https://api.github.com/users/konsumer/followers","following_url":"https://api.github.com/users/konsumer/following{/other_user}","gists_url":"https://api.github.com/users/konsumer/gists{/gist_id}","starred_url":"https://api.github.com/users/konsumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konsumer/subscriptions","organizations_url":"https://api.github.com/users/konsumer/orgs","repos_url":"https://api.github.com/users/konsumer/repos","events_url":"https://api.github.com/users/konsumer/events{/privacy}","received_events_url":"https://api.github.com/users/konsumer/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T21:54:40Z","updated_at":"2016-07-07T21:54:40Z","body":"Actually [sass-module-importer](https://www.npmjs.com/package/sass-module-importer) appears to already do this, so I guess the issue is including that project in the options for node-sass, like this:\r\n\r\n```js\r\nvar sass = require('node-sass');\r\nvar moduleImporter = require('sass-module-importer');\r\n\r\nsass.render({\r\n  file: './source/css/app.scss',\r\n  importer: moduleImporter()\r\n}, cb);\r\n```\r\n\r\nDo you want me to make a PR?"}}
{"actor":{"display_login":"konsumer"}}