blitzrk / sublime_libsass

Build system for Sass/scss files in Sublime Text 2/3 with no external dependencies
MIT License
18 stars 2 forks source link

Issue with partials #5

Closed ghost closed 8 years ago

ghost commented 8 years ago

Thanks for reworking on it. Really appreciate the work you did.

But there are few issues and suggestions that I got :-

Issues :-

  1. It is creating a build folder every time a partial file is compiled which should not happen. Partial files should be avoided from compiling .
  2. When a partial file is edited and saved, it should compile only those SCSS files in which that partial is included which is not happening right now. As a result, making changes in partial file later will not reflect those changes in the scss files in which it is included. Changes reflect only when we compile the main scss files in which they are included.
  3. Error messages not coming while compiling partial files.

Suggestions :-

  1. Rather than showing alert box every time, it will be better if you show the errors or even successful compilation messages in console just like sass build. Alert boxes coming while coding is not good. Have to close them every time.

I am attaching the screenshot of a folder structure that is getting this issues.

scss-structure

In both landing.scss and common.scss, I have included partial file just for testing.

Can you please have a look ?

ghost commented 8 years ago

Also, rather than maintaining a different .libsass.json file for each project, can we have something like other packages where there is a .user and .default file, so that we can edit .user file and can have same settings for all projects ?

blitzrk commented 8 years ago

Thank for testing it for me! Let me describe what's going on first and then how I plan to address each problem.

  1. This is caused by not having a config file. It guesses that the folder you are in (e.g. atoms) is the root directory for the project and makes an output folder before starting to compile. However, in your case, it will only look in atoms (and deeper) and not find any files requiring it, so there shouldn't be any css files in styles/atoms/build/css.
  2. It should only be compiling the non-partial files that require a partial if you try to build a partial. If you have more details on a case where that is not the case let me know.
  3. They do for me. Any chance you could give me a more specific breakdown of your layout so I can test it?
  4. I thought the extra enter press might be a problem.
  5. I originally didn't do this, because due to the limitations seen in answer 1, the per-project settings were needed anyway to dictate the top level of the project.

So here's what I'm changing right now.

Also, I'll check on errors in partials not working, but I think for you this problem stemmed from the unexpected behavior you got by not having a config file. Hopefully once I make the behavior less surprising, you'll see it just works!

Thank you, number 1 user!

blitzrk commented 8 years ago

Fixed everything in Release 7.4. Not sure how often PC checks GitHub for updates. Maybe try again in an hour? Or you could add "repositories": ["https://github.com/blitzrk/sublime_libsass"], remove Libsass Build, and install the sublime_libsass package to test it immediately.