thoughtbot / bitters

Add a dash of pre-defined style to your Bourbon.
https://thoughtbot.com
MIT License
1.39k stars 142 forks source link

Installing bitters when a "base" folder already exists #142

Closed alexharris closed 9 years ago

alexharris commented 9 years ago

Hello, I just got tripped up when installing bitters because I happened to have a folder called "base" already in my sass folder. The command line just said "Bitters files already installed, doing nothing", and it took me a while to figure out that it actually wasn't installed, it just saw the existing "base" folder and though it was. I think "base" is a fairly common folder for certain sass organizational schemes, so it might be helpful to have a more descriptive error message, something along the lines of "Folder 'base' already exists".

kylefiedler commented 9 years ago

Hey @alexharris I'm curious, why do you already have a base folder installed?

alexharris commented 9 years ago

Hi Kyle,

Not sure exactly where I picked it up (maybe Bourbon?), but it does seem to be a fairly common folder to use in sass file structuring. See:

https://github.com/evernote/sass-build-structure http://www.sitepoint.com/architecture-sass-project/ http://docssa.info/#fileStructure

(These are just from google "sass base folder")

In this case, I started a project a while ago using Bourbon and Neat, and had a base folder, then encountered the above issue when trying to install Bitters at a later date.

Hope that clarifies!

kylefiedler commented 9 years ago

@alexharris Yea that's exactly why we wanted to name the folder that. It's meant to be installed right after Bourbon and Neat. If you started the project a while ago why are you using Bitters now?

Just curious how people are using it. I agree we should have a error message that says

something along the lines of "Folder 'base' already exists".

alexharris commented 9 years ago

Hey, I don't think Bitters had been released when I started this project, is that possible? This time around I only installed it to access some Refills components. Still have yet to do a full Bourbon, Neat, Bitters, Refills (is there a term for all four?) build out from scratch, waitin' for the right thing to come along.

alexharris commented 9 years ago

Oh yeah, also if you are curious about the usage, it is here: http://openengagement.info/attend/schedule/

The page is not made public yet, and just has dummy text, but it is a combination of the "Vertical Tabs" pattern and "Expander" component.

haydenhancock commented 9 years ago

@kylefiedler I have the same issue as @alexharris. I started a Bourbon/Neat project about a week ago and didn't try to utilize Bitters and Refills until today. Because my scss folder structure already contained a "base" folder it didn't install properly.

kylefiedler commented 9 years ago

@haydenhancock @alexharris Why are you trying to install Bitters when you already have a base folder? I'm assuming in that base folder you already have basic styles why would you want to override those with Bitters? Do you want to use Refills components and are only installing Bitters because it was a dependency?

alexharris commented 9 years ago

It was a while ago, but I believe wanting to use Refills was the reason I was trying to install Bitters.

On Wed, Feb 11, 2015 at 9:06 AM, Kyle Fiedler notifications@github.com wrote:

@haydenhancock https://github.com/haydenhancock @alexharris https://github.com/alexharris Why are you trying to install Bitters when you already have a base folder? I'm assuming in that base folder you already have basic styles why would you want to override those with Bitters? Do you want to use Refills components and are only installing Bitters because it was a dependency?

— Reply to this email directly or view it on GitHub https://github.com/thoughtbot/bitters/issues/142#issuecomment-73919708.

haydenhancock commented 9 years ago

For me, I was just testing out different ways to create and manage projects.

RAFA3L commented 9 years ago

I think this is a good solution, just what I'm looking for

bourbon install --path ./sass/lib/
neat install && mv neat ./sass/lib/
bitters install && mv bitters ./sass/lib/

http://devin-clark.com/getting-started-with-bourbon/

krainboltgreene commented 9 years ago

Is there a particular reason why bitters is the odd duckling? bourbon -> bourbon, neat -> neat, bitters -> base ...?

kylefiedler commented 9 years ago

@krainboltgreene At one time it was but Bitters is meant to be pulled in and edited. We feel like the folder should be named semantically so that someone without knowledge of what Bitters is will understand what sits inside of the directory.

krainboltgreene commented 9 years ago

Seems like this thread indicates that's not a good change? "base" is pretty generic.

On Tue, May 19, 2015 at 8:20 AM, Kyle Fiedler notifications@github.com wrote:

@krainboltgreene https://github.com/krainboltgreene At one time it was but Bitters is meant to be pulled in and edited. We feel like the folder should be named semantically so that someone without knowledge of what Bitters is will understand what sits inside of the directory.

— Reply to this email directly or view it on GitHub https://github.com/thoughtbot/bitters/issues/142#issuecomment-103486279.

Kurtis Rainbolt-Greene, Hacker Software Developer 1631 8th St. New Orleans, LA 70115

kylefiedler commented 9 years ago

@krainboltgreene The reason we are using it is because it's generic and a pretty well accepted practice. Since they are scaffold styles, we expect that a majority of the time Bitters will be installed at the very start of a new project. In that case there won't be any conflicts.

alexharris commented 9 years ago

It seems ok to me to have it installed in "base" for the reasons kyle listed above, as long as it is clearly documented (and the potential for conflict explained) and a specific error is raised if "base" already exists.

alexharris commented 9 years ago

Alternately, what about the option to let the user decide during installation on the command line? Could prompt user to enter folder name, suggesting Base

krainboltgreene commented 9 years ago

Like, I just don't get the default being base. "well accepted practice" implies that others do it, but I've never seen it and...wouldn't that be bad if they did? The exact issue here is someone already having a folder named base.

In addition if the assumption and goal is there would be no conflict it seems like it would be to bitter's benefit to not take up that namespace and instead call itself something unique.

Like bitters/.

On Thu, May 21, 2015 at 8:24 PM, Alex Harris notifications@github.com wrote:

Alternately, what about the option to let the user decide during installation on the command line? Could prompt user to enter folder name, suggesting Base

— Reply to this email directly or view it on GitHub https://github.com/thoughtbot/bitters/issues/142#issuecomment-104469957.

Kurtis Rainbolt-Greene, Hacker Software Developer 1631 8th St. New Orleans, LA 70115

krainboltgreene commented 9 years ago

Also I want to be clear I recognize I'm some rando coming from outside the community telling bitters what it should do.

But I also like the bourbon system and so I think my suggestion is valuable enough to speak up. It seems like the best policy is one of explicitness.

On Thu, May 21, 2015 at 8:41 PM, Kurtis Rainbolt-Greene < me@kurtisrainboltgreene.name> wrote:

Like, I just don't get the default being base. "well accepted practice" implies that others do it, but I've never seen it and...wouldn't that be bad if they did? The exact issue here is someone already having a folder named base.

In addition if the assumption and goal is there would be no conflict it seems like it would be to bitter's benefit to not take up that namespace and instead call itself something unique.

Like bitters/.

On Thu, May 21, 2015 at 8:24 PM, Alex Harris notifications@github.com wrote:

Alternately, what about the option to let the user decide during installation on the command line? Could prompt user to enter folder name, suggesting Base

— Reply to this email directly or view it on GitHub https://github.com/thoughtbot/bitters/issues/142#issuecomment-104469957 .

Kurtis Rainbolt-Greene, Hacker Software Developer 1631 8th St. New Orleans, LA 70115

Kurtis Rainbolt-Greene, Hacker Software Developer 1631 8th St. New Orleans, LA 70115

whmii commented 9 years ago

One issue with calling the core folder bitters instead of something like base is that doing so encourages the designer/dev using bitters to treat it like a library, instead of a starter/boilerplate. The goal for bitters is that someone install it and then instantly change it to their liking (including renaming the folder if they want).

To me, calling the folder bitters is code for "don't touch this and write your styles somewhere else."

I'd be interested in discussing if bitters should have some prompt asking what you want to call your core dir, but i think that should be it's own issue, separate from this one.

robwise commented 9 years ago

The goal for bitters is that someone install it and then instantly change it to their liking (including renaming the folder if they want).

To me, calling the folder bitters is code for "don't touch this and write your styles somewhere else."

I was with the other guys objecting to the name base until I read this. I had no idea that this was how I was supposed to be using Bitters. I thought I was supposed to override whatever variables I wanted to change and then import Bitters in its pristine state (similar to how one might use Twitter Bootstrap). Now that I'm reading this and looking at the source code and realizing that there are no !default flags on any variable declarations, I'm realizing that may not be the case.

However, that's not very intuitive since it's specifically made available on Bower, which is a tool for keeping front-end dependencies up-to-date. Why is this on Bower if we are supposed to be hard-coding changes (as opposed to the above-described method of overriding default variables) and therefore could not update without wiping our changes?

tysongach commented 9 years ago

@robwise Someone else actually added Bitters to Bower awhile back, not us. But we did have them remove it from the registry, so it shouldn’t be available there anymore.

robwise commented 9 years ago

@tysongach Aha! Now this all makes sense. I did bower search bitters from the command line and it picked up the GitHub repo and I wasn't paying enough attention.

whmii commented 9 years ago

Seems resolved. Closing.

whmii commented 9 years ago

Also as a note from the original issue. Currently bitters will not overwrite a file if base already exists.

screen shot 2015-08-21 at 1 07 44 pm

alexharris commented 9 years ago

I maintain that the error message could be improved. Just because a "base" folder exists, does not mean bitters is installed, as this thread shows. An error message reading "A folder called 'base' already exists, doing nothing" would be more clear and accurate.

krainboltgreene commented 9 years ago

It's crazy how that might be the case Alex, as everyone in the world knows that Bitters has ownership of a project root directory folder named "base". Any confusion is clearly their fault.

On Fri, Aug 21, 2015 at 12:20 PM, Alex Harris notifications@github.com wrote:

I maintain that the error message could be improved. Just because a "base" folder exists, does not mean bitters is installed, as this thread shows. An error message reading "A folder called 'base' already exists, doing nothing" would be more clear and accurate.

— Reply to this email directly or view it on GitHub https://github.com/thoughtbot/bitters/issues/142#issuecomment-133501934.

Kurtis Rainbolt-Greene, Hacker Software Developer 1631 8th St. New Orleans, LA 70115