Skip to content

Adding Bower support to the generator.#49

Closed
diagramatics wants to merge 8 commits intoassemble:masterfrom
diagramatics:use-bower
Closed

Adding Bower support to the generator.#49
diagramatics wants to merge 8 commits intoassemble:masterfrom
diagramatics:use-bower

Conversation

@diagramatics
Copy link

I still have more contribution in mind, but this will be the first for now. Not including Bower would be a "violation" to the rules of Yeoman.

Some minor changes are also added to the code as well. Capitalizing the H on Git(H)ub, and leveraging the already-installed load-grunt-tasks to load the specific Grunt tasks. The rest are just the matter of removing the local Bootstrap files and changing the file path.

And since I have just planned to try Assemble, there might be some way to put bower_components directory and the relative file paths pointing to it be controlled by Assemble itself, is it?

As what GitHub explained in their branding.
The package is in package.json already, but nobody's using it.
Assemble is loaded separately because load-grunt-tasks doesn't do that.
Giving it the old Bootstrap 2 looks is going to trick users to think
that the generator is old and not updated, IMO.
Adding a function to handle Bower files, deleting local Bootstrap files,
changing file paths to bower_components. The file paths might be wrong
in terms of Assemble's intended functions though.
@jonschlinkert
Copy link
Member

Thanks for doing this, but we're about to upgrade the generator for the next version of Assemble, as you can see in the other pending pull request: #43.

Not including Bower would be a "violation" to the rules of Yeoman.

Also, what does this mean? Please provide a link to whatever "rule" you're speaking of. It makes no sense to include bower on many projects. Any project can do anything it wants to do.

@diagramatics
Copy link
Author

Yeah, I double-checked the changes on #43 before deciding to do this. I'm still blind about Assemble since I'm trying to use it for now — see what it does. So I think I'll help by adding features non-Assemble related like Bower, maybe Sass, and options to choose whether to put Bootstrap in or not.

And by "violation", it's not really something serious. I've been seeing generators including Bower, and it gives a proper package managing instead of updating the locally stored Bootstrap copy every time a minor patch is released. Plus, with initializing Bower the first time the generator is being ran, you get a locally stored copy of the dependencies needed for offline work (perhaps). I saw jQuery and the shims being loaded from a CDN.

The Yeoman workflow is comprised of three types of tools for improving your productivity and satisfaction when building a web app: the scaffolding tool (yo), the build tool (Grunt, Gulp, etc) and the package manager (like Bower and npm).

That's the quote on Yeoman's website. The "violation" that I meant.

@jonschlinkert
Copy link
Member

and the package manager (like Bower and npm).

IMO "Like" is a description of how a package manager "usually" fits into this workflow. In the next version of the generator, all of the boilerplates (e.g. bootstrap) will be pulled in from other repos, so perhaps we can continue this discussion at that time?

@diagramatics
Copy link
Author

Perhaps in that sentence the word "like" is more on the "such as" bit. The package manager is one of the tools of the Yeoman workflow, so it's kind of the rule, I guess.

And yeah, I can do that and resend a modified PR with the new generator — Bower actually fits that requirement perfectly. Looking forward for the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants