glenn2223/vscode-live-sass-compiler

How to rewrite output file name with settings.json?

codewizard13 opened this issue · 1 comments

Is there a setting I can use in settings.json to rewrite the root-part of the output filename (not the extension)? For instance, I want to have what is called "style.scss" in my dev/ folder output to "index.css" in my css/ folder.

I tried using savePathReplacementPairs like this:

          "savePathReplacementPairs": {
            "/style.css/": "/index.css/"
          },

Here's my full settings.json:

{
  "liveSassCompile.settings.formats": [
      {
          "format": "expanded",
          "extensionName": ".css",
          "savePathReplacementPairs": {
            "/style.css/": "/index.css/"
          },
          "savePath": "/css"
      },
      {
        "format": "compressed",
        "extensionName": "min.css",
          "savePath": "/css"
      }
  ],
  "liveSassCompile.settings.excludeList": ["**/node_modules/**", ".vscode/**"],
  "liveSassCompile.settings.generateMap": false,
  "liveSassCompile.settings.autoprefix": ["defaults"],
  "liveSassCompile.settings.partialsList": [
    "/**/_*.s[ac]ss"
  ],
}

Related to: #350

Sorry, it's not possible.

The extension has always done straight conversions to not risk user unintentionally overwriting files - because of this the functionality isn't there.

This has been requested on the odd occasion. When I start actively working on the v7 stuff I'll keep this in mind; but there's no guarantee I'll be able to figure a way to incorporate it - as such, I'll close this issue


Again, please feel free to continue commenting if you have more queries