bdkjones / CodeKit-1-Old

146 stars 1 forks source link

Saving a Sass tiered partial does not initiate a compile of the main Sass file #589

Open benfrain opened 11 years ago

benfrain commented 11 years ago

Kind of related to this issue - when I work on a partial Sass file and save, CodeKit doesn't recompile the 'master' style sheet.

For example. I have a structure like this:

styles.scss
_partials/modules/_header.scss
_partials/modules/_footer.scss
_partials/_base.scss
_partials/_fonts.scss
_partials/_modules.scss // Imports the modules/_header & modules/_footer

If I make a change in _partials/modules/_header.scss then styles.scss (which corresponds to the only resultant CSS file - styles.css) does not compile. I have to move to _partials/_modules.scss and re-save that file (even though nothing has actually changed in it) to make the sass recompile.

Is this expected behaviour?

bdkjones commented 11 years ago

I would need to see the actual files in order to ascertain what's wrong, but assuming the import statements are all set up correctly, saving the _header and _footer files should cause CodeKit to walk the chain backwards until it finds the root stylesheet at the beginning of the import chain (styles.css).

Send me the files and I'll take a look.

benfrain commented 11 years ago

HI Bryan, thanks. The thing I was working on is a private work 'thing' so I'll try and replicate the issue on a home project and if it does the same there I will get the files to you.

benfrain commented 11 years ago

Hi, sorry for the delay, just created a repository to demonstrate: https://github.com/benfrain/codekit-import-test If you grab that and take a look at the README.md you should be able to replicate.

bdkjones commented 11 years ago

Unable to replicate on my end.

Using the demo project you sent, if I open "_header.scss", make a change and then save the file, CodeKit recompiles "styles.scss" (the file at the top of the import-chain) and I see the correct line in the corresponding CSS file.

Try disabling the Compass cache (there's a line to add to the config.rb file to do this). It gives some people problems for some reason.

Also: when you select each of the three Sass files in CodeKit's list, you should see the correct files listed in the "imports" and "imported by" tables. E.g. _module-importer.scss should be imported by styles.scss and it should import _header.scss. Do these import/imported-by tables look correct on your end? (They do over here with the demo project you sent.)