{"action":"closed","issue":{"url":"https://api.github.com/repos/electronjs/electron-compilers/issues/2","labels_url":"https://api.github.com/repos/electronjs/electron-compilers/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/electronjs/electron-compilers/issues/2/comments","events_url":"https://api.github.com/repos/electronjs/electron-compilers/issues/2/events","html_url":"https://github.com/electronjs/electron-compilers/issues/2","id":98230902,"number":2,"title":"Ignored includePaths option","user":{"login":"parro-it","id":11197111,"avatar_url":"https://avatars.githubusercontent.com/u/11197111?v=3","gravatar_id":"","url":"https://api.github.com/users/parro-it","html_url":"https://github.com/parro-it","followers_url":"https://api.github.com/users/parro-it/followers","following_url":"https://api.github.com/users/parro-it/following{/other_user}","gists_url":"https://api.github.com/users/parro-it/gists{/gist_id}","starred_url":"https://api.github.com/users/parro-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parro-it/subscriptions","organizations_url":"https://api.github.com/users/parro-it/orgs","repos_url":"https://api.github.com/users/parro-it/repos","events_url":"https://api.github.com/users/parro-it/events{/privacy}","received_events_url":"https://api.github.com/users/parro-it/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-30T18:21:47Z","updated_at":"2015-08-04T17:20:19Z","closed_at":"2015-08-04T17:20:19Z","body":"Hi, I'm trying to use electron-compile to compile a sass file.\r\nI have to import bootstrap-sass, so I pass `includePaths` option to electron-compile\r\n\r\n```javascript\r\nrequire('electron-compile').initWithOptions({\r\n  cacheDir: join(__dirname, '/cache'),\r\n  compilerOpts: {\r\n    // Compiler options are a map of extension <=> options for compiler\r\n    js: { stage: 0},\r\n    scss: { includePaths: [\r\n       join(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets'),\r\n        ]};\r\n  }\r\n});\r\n```\r\n\r\nBut it appear that the option is just ignored...\r\nDigging in source files, I think I found that the problem is in electron-compilers/src/css/scss.js.\r\n\r\nIn method compile, you are overriding the includePaths option:\r\n\r\n\r\n```javascript\r\ncompile(sourceCode, filePath) {\r\n    let paths = Object.keys(this.seenFilePaths);\r\n    paths.unshift('.');\r\n\r\n    let opts = _.extend({}, this.compilerInformation, {\r\n      data: sourceCode,\r\n      indentedSyntax: filePath.match(/\\.sass$/i),\r\n      sourceMapRoot: filePath,\r\n      includePaths: paths,\r\n      filename: path.basename(filePath)\r\n    });\r\n\r\n    let result = scss.renderSync(opts);\r\n    return result.css.toString('utf8');\r\n  }\r\n```\r\n\r\nI solved the problem by do a concat with the given option, saved in constructor:\r\n\r\n```javascript\r\ncompile(sourceCode, filePath) {\r\n    let paths = Object.keys(this.seenFilePaths);\r\n    paths.unshift('.');\r\n\r\n   /////////////////////   /////////////////////   /////////////////////  \r\n    paths = paths.concat(this.compilerInformation.includePaths);\r\n   /////////////////////   /////////////////////   /////////////////////  \r\n    let opts = _.extend({}, this.compilerInformation, {\r\n      data: sourceCode,\r\n      indentedSyntax: filePath.match(/\\.sass$/i),\r\n      sourceMapRoot: filePath,\r\n      includePaths: paths,\r\n      filename: path.basename(filePath)\r\n    });\r\n\r\n    let result = scss.renderSync(opts);\r\n    return result.css.toString('utf8');\r\n  }\r\n```\r\n\r\nIf you think my solution it's ok, I can prepare a PR\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}