Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to rewrite output file name with settings.json? #352

Closed
codewizard13 opened this issue Apr 9, 2024 · 1 comment
Closed

How to rewrite output file name with settings.json? #352

codewizard13 opened this issue Apr 9, 2024 · 1 comment

Comments

@codewizard13
Copy link

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

@glenn2223
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants