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

Feature Suggestion: Disable on-save compilation of certain files #69

Open
rudfoss opened this issue Jun 5, 2014 · 2 comments
Open

Feature Suggestion: Disable on-save compilation of certain files #69

rudfoss opened this issue Jun 5, 2014 · 2 comments

Comments

@rudfoss
Copy link

rudfoss commented Jun 5, 2014

My workflow consists of several separate scss files and one master that contains imports for all the other files. In this case only the master file needs to be compiled, but it should be compiled every time I save any of the imported files.

Example:

  • moduleA.scss
  • moduleB.scss
  • moduleC.scss
  • project.scss <-- This is the only file that needs to be compiled when any file is saved.

project.scss

@import "moduleA.scss"
@import "moduleA.scss"
@import "moduleA.scss"

I'd love it if it was possible trigger compile of project.scss whenever any module is saved and not bother compiling each module separately.

For now I'm modifying each module, saving it then saving project.scss.

@darrenkopp
Copy link
Owner

Edits to imported files should bubble up, so I'm not sure why it's not in this case. Also, unless you are wanting modulea.css and moduleb.css, you should be prefixing those with _ (aka _modulea.css).

I'll see if I can reproduce the scenario you described, but I know it's come up before and I could have sworn I fixed that already.

@rudfoss
Copy link
Author

rudfoss commented Jun 5, 2014

Do you mean I should prefix the scss or css files? E.g.: _moduleA.scss? I am not deploying the module css files anyway as they are set to not be part of the project.

Also. The module files may not contain valid scss. This is because I'm expecting SASS to simply paste their content into project.scss and then compile it. This means that the modules may not actually compile on their own. They may contain scss like this:

&.error {
...
}

which would be illegal and result in compile errors, but not when inserted into the project.scss file like this:

.container{
...
    @import "moduleA.scss";
...
}

I apologise for not including this in the OP. It should definitely have been there.

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