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

settings.json path wrong for main file. #39

Open
neessen opened this issue May 12, 2021 · 0 comments
Open

settings.json path wrong for main file. #39

neessen opened this issue May 12, 2021 · 0 comments

Comments

@neessen
Copy link

neessen commented May 12, 2021

I just tried out this extension and I am having some issues targeting the correct main file in settings.json.

I have a folder structure like this:

- .vscode
   settings.json
- themes
- - theme-name
- - - css
        style.scss
        style.min.css
- - - - scss
- - - - - header
             _header.scss

I want to compile a style.min.css from style.scss when _header.scss is saved.
If i write this on the first line of _header.scss it works as expected: // main: ../../style.scss
However if i write this line in the .vscode/settings.json file it returns an error because the file path is wrong: "main": "../../style.scss"
This generates the following error on _header.scss save:
Cannot open file <path_to_project>/themes/style.scss
It seems like it goes two levels up from the style.scss file insted of the _header.scss file. If i change it to "main": "style.scss" i get the following error:
Cannot open file <path_to_project>/themes/theme-name/css/scss/header/style.scss
Am i doing something wrong here or is it a bug?
My complete .vscode/settings.json file is like this:

{
  "easycompile.css": {
    "outExt": ".min.css"
  },
  "easycompile.sass": {
    "main": "../../style.scss",
    "outExt": ".min.css",
    "compress": true,
    "sourceMap": true,
    "sourceMapFileInline": false
  }
}

and global settings.json file:

"easycompile.compile": {
    "minifyJsOnSave": true,
    "minifyCssOnSave": true
},

I have also tried to use the ${workspaceRoot} variable, but that would require for me to update the settings file with each project name and theme name for every project, it would be better if i could use a relative path. I have also tried to use the ${workspaceFolder} variable as mentioned in the docs here: https://github.com/mrcrowl/vscode-easy-less but that doesn't seem to be supported in this extension, but that still wouldn't be ideal as i would still have to change path for each settings.json file per project.

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

1 participant