Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Installs bower packages but not app directory #27

Closed
gerrymiller opened this issue Mar 20, 2014 · 11 comments
Closed

Installs bower packages but not app directory #27

gerrymiller opened this issue Mar 20, 2014 · 11 comments

Comments

@gerrymiller
Copy link

I'm running yo bootstrap. It creates only the bower_components directory, but nothing else. Here's a screencast of what's happening: http://screencast.com/t/x1EbCvH55.

Any ideas? Thanks!

  • Gerry
@stephenplusplus
Copy link
Contributor

This is actually the intended behavior for that generator. Here's a link to the official repo for generator-bootstrap.

Yeoman is working towards being more modular in its approach to development. Someday in the future, you might have a project that you want to start using CoffeeScript in. You could be in your existing project, then run yo coffee (or something similar), and end up with the right working configuration for using CoffeeScript.

Additionally, a generator, say generator-webapp, can integrate with other generators, like generator-bootstrap, generator-coffee, generator-jade, etc., and not have to hold so much custom logic inside generator-webapp, instead relying on the other generators to do their part.

In the case of generator-bootstrap, you're saying, "I want to drop Bootstrap into my project. What's the easiest way to start using it?" yo bootstrap and boom-- you're ready to go.

Hope this helps 👍

@gerrymiller
Copy link
Author

Thanks for the quick reply. Addy's video here: https://www.youtube.com/watch?v=RO8TdD5EuNs shows a different story, ergo my confusion :-)

So, if I want to use webapp + bootstrap w/ LESS, would I yo webapp without choosing bootstrap, then add it using yo bootstrap and choose the LESS option?

Thanks again, just a bit confusing when the docs (such as Addy's somewhat recent video) are outdated.

@stephenplusplus
Copy link
Contributor

Let's just ping @addyosmani -- maybe I have a different understanding!

On Thursday, March 20, 2014, Gerry Miller notifications@github.com wrote:

Thanks for the quick reply. Addy's video here: A Yeoman generator for
Twitter Bootstrap https://www.youtube.com/watch?v=RO8TdD5EuNs shows a
different story, ergo my confusion :-)

So, if I want to use webapp + bootstrap w/ LESS, would I yo webappwithout choosing bootstrap, then add it using yo
bootstrap and choose the LESS option?

Thanks again, just a bit confusing when the docs (such as Addy's somewhat
recent video) are outdated.

Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-38165246
.

@gerrymiller
Copy link
Author

Smart, thanks 👍

@stephenplusplus
Copy link
Contributor

After watching that video, I think my explanation is still true. I can see how it's confusing, however, since you didn't end up with app/bower_components/, and instead got simply, bower_components/. That is likely either due to Addy's machine having a global .bowerrc file that instructs Bower downloads to default to app/bower_components, or he's using an older version of generator-bootstrap, when it might have installed to app/bower_components by default.

So, if I want to use webapp + bootstrap w/ LESS, would I yo webapp without choosing bootstrap, then add it using yo bootstrap and choose the LESS option?

Yes, I believe that's a good idea, because I don't think you'll be able to get a LESS option for Bootstrap with just yo webapp. Try it out, and if it works, then that was the right answer! Be sure to let us know if you get the desired results.

@gerrymiller
Copy link
Author

I'm not sure we're seeing the same thing. If you look at 1:24 in the video, you'll see there's an /app directory with a fully configured website inside it (not just bower_components). But I'm not getting an /app directory at all. That's what's confusing me.

@stephenplusplus
Copy link
Contributor

We're definitely not seeing the same thing. It's just app then inside, bower_components for me.

@gerrymiller
Copy link
Author

Screenshot from the video's bower_components dir shows a full bootstrap app, with a Gruntfile.js and all the other goodies:

screen shot 2014-03-20 at 7 59 33 am

But when I run it, this is all that's in my bower_components dir:

screen shot 2014-03-20 at 8 00 16 am

I thought I'd get a fully Grunt build-able package (as the video implies), but instead I get a package that I seem to have to manually integrate into my existing Gruntfile.js. That's all I'm sayin' ;-)

(BTW I know the video used the Saas version and I used the LESS version, but I verified the same happens when I choose the Saas option.)

@stephenplusplus
Copy link
Contributor

The idea of the generator is just to install a Bower package for you. The one he got was sass-bootstrap, which was installed in the app/bower_components/ directory. The contents of that Bower package are what you have in the screenshot. What's in that directory isn't meant to be run, or built. It's just supposed to give you the core files that represent that Bower package.

From your app, which can live wherever, say src/, you would refer to those files however applicable:

@import "../bower_components/sass-bootstrap/sass-bootstrap.scss";

...or...

<link rel="stylesheet" href="../bower_components/bootstrap/bootstrap.css">

etc.

@gerrymiller
Copy link
Author

Got it, thanks! Just works differently than I expected.

Thank you for the help. 👍

@stephenplusplus
Copy link
Contributor

No problem. Using these tools in combination isn't always straightforward. Feel free to come back with any other questions!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants