electron-userland / electron-compilers

DEPRECATED: Compiler implementations for electron-compile
35 stars 55 forks source link

Add paths from 'includePaths' to Sass compiler #78

Open pamtbaau opened 7 years ago

pamtbaau commented 7 years ago

I've seen and encountered some issues regarding imports in Sass files. The proposed changes fixed the issues for me.

I use the property includePaths in .compilerc which is read by sass.js. The property includePaths is added to this.compilerOptions but is not a valid option for the compiler. So, after reading the property and adding the paths to be included to paths, I discard it before is gets passed to sass.compiler.

I've tested the changes in a standard project created by electron-forge init and added a few stylesheets containing imports (e.g. bootstap scss files).

The includePaths is added to .compilerc like:

  "env": {
    "development": {
      "text/scss": {
        "includePaths": ["../../node_modules/bootstrap/scss"]
      },
      ...

The includePaths are relative to the stylesheet being compiled.

alreece45 commented 7 years ago

Is this different from the paths option?