bdkjones / CodeKit-1-Old

146 stars 1 forks source link

Compas Config generator: allow "/" as value to set root as output dest. #612

Open ghost opened 11 years ago

ghost commented 11 years ago

When generating a Compas Config file using CodeKit's build in tool, I can't specify the root folder as the destination for the generated css. It requires me to enter a value and doesn't accept "/"

If I manually edit the config.rb file and change the css_dir value like this:

css_dir = "/"

..it works fine. Is it on purpose that this canfiguration can not be acheived using the Generator UI of CodeKit?

bdkjones commented 11 years ago

Hmm.. it never occurred to me to test that because 99.999% of people want their stylesheets in a subfolder. I'm not sure if this is a CodeKit issue or an issue with the Compass executable itself. I'll have to investigate. In the meantime, why do you want your stylesheets to exist at the root folder level?

ghost commented 11 years ago

Because my watch folder / project root folder is a WordPress theme folder, and the main stylesheet for the theme (style.css) needs to be in the root for WordPress to recognize it. I could add an import statement to it, and have my actual css rules in a 'css' subfolder but I just want to avoid loading extra files.

Anyway I just generate the config file using CodeKit, and set 'css' as the output folder, then manually edit the config.rb file and change it it "/". Then all works fine. So I figured that it should be possible to set this directly from the settings UI. No big deal though.

bdkjones commented 11 years ago

Agreed. It may be Compass that applies the default, but I'll take a look and verify this. Thanks!

On 2013 Jun 07, at 01:18 , Mikkel Breum notifications@github.com wrote:

Because my watch folder / project root folder is a WordPress theme folder, and the main stylesheet for the theme (style.css) needs to be in the root for WordPress to recognize it. I could add an import statement to it, and have my actual css rules in a 'css' subfolder but I just want to avoid loading extra files.

Anyway I just generate the config file using CodeKit, and set 'css' as the output folder, then manually edit the config.rb file and change it it "/". Then all works fine. So I figured that it should be possible to set this directly from the settings UI. No big deal though.

— Reply to this email directly or view it on GitHub.

kkarkos commented 11 years ago

I ran into same problem today. I never had problems css_dir = "/". I updated my gems today and CodeKit crashes when it tries to compile. Not sure if this has something to do with the update. Creating the project with CodeKit instead through the command line as mikkel did also didn't work for me. I also tried to switch between the inbuild and external compiler. Still crashes.

What worked for me was to untick the "Do not compile directly" for the style.scss.

bdkjones commented 11 years ago

In your case, you've likely got an infinite import loop set up between stylesheets.

On 2013 Jun 10, at 23:32 , kkarkos notifications@github.com wrote:

I ran into same problem today. I never had problems css_dir = "/". I updated my gems today and CodeKit crashes when it tries to compile. Not sure if this has something to do with the update. Creating the project with CodeKit instead through the command line as mikkel did also didn't work for me. I also tried to switch between the inbuild and external compiler. Still crashes.

What worked for me was to untick the "Do not compile directly" for the style.scss.

— Reply to this email directly or view it on GitHub.

kkarkos commented 11 years ago

Yes, I have changed the file structure a bit for a new project. Might be a loop then. Thanks