Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Multiple save folders #26

Closed
morsanu opened this issue Nov 16, 2017 · 11 comments
Closed

Multiple save folders #26

morsanu opened this issue Nov 16, 2017 · 11 comments

Comments

@morsanu
Copy link

morsanu commented Nov 16, 2017

I ran into a small problem, I have more than one sass folders in my solution, something like this:

root
---- sass
---- ---- style.scss
---- folder1
---- ---- sass
---- ---- ---- style.scss

I would like to save my css files like this:

root
---- sass
---- ---- style.scss
---- css
---- ---- style.css
---- folder1
---- ---- sass
---- ---- ---- style.scss
---- ---- css
---- ---- ---- style.css

but the "savePath" setting is global and it's relative to the root.
Is there a way to achieve what I'm looking for?

@ritwickdey
Copy link
Owner

yes! In your example, it will not work!
I'm wondering how the setting will be look like! Have you any suggestion?

I think, it might be good:

savePath : ~/../css/

this ~ will be indicates the individual Sass/Scss path

@boyum
Copy link
Contributor

boyum commented Nov 18, 2017

Perhaps the includeItems array could be configured to take objects as well. Maybe something like this could work:

"includeItems": [
 {
    "input": "./scss/src.scss",
    "output": "./css/dist.css"
  }
]

Another way would be to do it like webpack.

@morsanu
Copy link
Author

morsanu commented Nov 19, 2017

@ritwickdey I was thinking of the same solution. "~" to work as a relative root to the specific scss/sass folder.

@hkarn
Copy link

hkarn commented Nov 29, 2017

That the css save path can't be set relative to the scss file location just became my main issue when switchin from Atom to VS Code working on my old projects.

Save path savePath : ~/../css/ for relative to .scss would be very good.

@boyum
Copy link
Contributor

boyum commented Dec 13, 2017

Just adding support for relative path might solve a few problems, but considering scenarios like #29 and #32, entirely independent filenames could be necessary. To combine them might be an idea, like this:

"includeItems": [
 {
    "input": "~/scss/src.scss",
    "output": "~/css/dist.css"
  }
]

I haven't looked at the code for this in a while, so it might be difficult to solve the problem like this.

@ritwickdey
Copy link
Owner

Hi @boyum... It would be nice... but there is also a savePath settings.
But don't think it's making extra complexity ?

@ritwickdey ritwickdey self-assigned this Dec 21, 2017
ritwickdey added a commit that referenced this issue Dec 21, 2017
ritwickdey added a commit that referenced this issue Dec 21, 2017
@ritwickdey
Copy link
Owner

This feature is added in v1.2.0 update. Please update it from vscode marketplace 😄.

Let me know if it okay or not. 😄

If you like the extension, please drop a review to vscode marketplace. 😸

@ritwickdey
Copy link
Owner

All the further discussion of "compiling SCSS to CSS with different name" will be #29.

For now, I'm closing this issue as the main purpose of the issue is added from v1.2.0

@Eduardo-SD
Copy link

It would be nice to save different files into separate folders and say to the settings where I want to save each file.

@Rashad-Stack
Copy link

you can import all sass to the main scss then compile the main scsss to a css that is!

@whizzbbig
Copy link

you can import all sass to the main scss then compile the main scsss to a css that is!

every one knows 🤷🏻‍♂️ that the thing is your css is out of the folder of scss and you want scss file to compile it in that file.

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

No branches or pull requests

7 participants