Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish on bower #177

Closed
ro-ka opened this issue Feb 18, 2014 · 25 comments
Closed

Publish on bower #177

ro-ka opened this issue Feb 18, 2014 · 25 comments
Labels

Comments

@ro-ka
Copy link

ro-ka commented Feb 18, 2014

Used shower for my slides and it worked great. But the workflow could be better, I think.

When the shower repo and the themes would be published on bower, one could create a new presentation more easy. It would separate the logic from the actual presentation. Then it would not be necessary to use sub-repositories.

Interested? Then I could create a Pull Request with the necessary bower information.

@pepelsbey
Copy link
Member

Sounds good! But could you please (before writing any code) show examples how Shower would be initiated using Bower? Let’s plan it first.

We should probably have two modes available:

@ro-ka
Copy link
Author

ro-ka commented Feb 18, 2014

Yes, each template should be an individual bower package.

So, in a new folder, one installs shower and a template of choice:

bower install shower
bower install shower-template-ribbon

The bower install will basically check out the git branches and place the files in a folder bower_components. So to use shower, one creates an index.html and includes the files from:

<script src="bower_components/shower/shower.js" />
<link href="bower_components/shower-template-ribbon/main.css" rel="stylesheet"/>

When the modules are released via bower, it would be possible to set up a yeoman generator including a template selection. For starters there could be a my-presentation repo which contains the getting started demo. Also there can still be a .zip download with the complete presentation for people without bower.

What further information do you need?

@pepelsbey
Copy link
Member

Would it be just a bower.json in the root of existing Shower components or separate repository under github.com/shower? I'm a bit confused by bower_components subfolder and new paths, but I guess there's nothing much to do.

Would it be interesting for you to also make an npm package? Since it's quite similar to bower.

BTW, all Shower modules are already available as ZIP files: shwr.me/shower.zip, shwr.me/template.zip, etc.

@ro-ka
Copy link
Author

ro-ka commented Feb 19, 2014

The only change in the shower and template repositories would be adding a bower.json.

The bower_components folder will be created when you use the bower module later. An npm package doesn't make much sense as this is a frontend package and npm is more for server side packages.

Regarding the ZIP files, I just wanted to mention that it would be still possible to provide them. :)

@ro-ka
Copy link
Author

ro-ka commented Feb 19, 2014

Just saw this in twitter: A bower introduction

@h4
Copy link
Contributor

h4 commented Feb 26, 2014

@pepelsbey , JFYI, you may change bower_components to any other path using .bowerrc config file.

@ro-ka
Copy link
Author

ro-ka commented Feb 26, 2014

@pepelsbey, @h4: Yes, but that is only needed when installing shower via bower. For publishing in bower only the bower.json is needed, containing some meta information.

@pepelsbey
Copy link
Member

Sorry for late replies, something’s wrong with notifications :( Currently I’m discussing with @tonyganch idea to move Shower from git submodules infrastructure to packages (npm and bower). It’s a bigger task than just adding bower.json, but I’m definitely going to make Shower available in package managers.

Thank you @ro-ka for pushing this idea!

@ro-ka
Copy link
Author

ro-ka commented Feb 26, 2014

@pepelsbey: Nice to hear that! :)

Is the discussion public or private?

@pepelsbey
Copy link
Member

@ro-ka, it’s offline discussion :)

@tonyganch
Copy link
Member

@ro-ka, if you like wine and happen to be in St. Petersburg, Russia, feel free to join :)

@ro-ka
Copy link
Author

ro-ka commented Feb 26, 2014

@pepelsbey @tonyganch That's not right around the corner. ;)

Tell me about the results, then! :)

@pepelsbey
Copy link
Member

@ro-ka, it’s not announced yet but see Readme in npm branch. There will be bower branch and packages tomorrow, right now only npm packages are ready.

@ro-ka
Copy link
Author

ro-ka commented Mar 9, 2014

Awesome! Will try it for my next talk. :) Thanks!

@kirjs
Copy link

kirjs commented Mar 13, 2014

I'm looking into writing a yeoman generator-shower, once it's in bower, let me know if any of you guys want to collaborate on that.

@ro-ka
Copy link
Author

ro-ka commented Mar 13, 2014

@kcherkashin: Sounds good! Can help with that.

@pepelsbey
Copy link
Member

@kcherkashin @ro-ka, I’m inclining to keep all modules in npm only and not to spend time on republishing the same packages to Bower. Especially since Bower is built on top of npm. Also one package (grunt-csso) required for themes is not available in Bower.

Is it possible to use npm packages in Yeoman generators?

@ro-ka
Copy link
Author

ro-ka commented Mar 13, 2014

@pepelsbey: Releasing in npm and bower are two different things: npm is a node (server side) package manager and bower is a frontend package manager. As shower is an app for frontend use, it should be released in bower. The effort is really small, as you only need an bower.json with the project definitions. When it's published once, it is enough to just add a new tag in git and you've got a new release.

Regarding the grunt-csso: The sense of bower is to publish the finished frontend package, not the single source files. That's why you can ignore some files (like tests and so on) for releasing in bower. So a bower install gives you a folder with just the basics for using shower, not the build stuff to develop it.

If you like, I can generate the bower.json and send a pull request. If you use semver, you're done after that.

@pepelsbey
Copy link
Member

@ro-ka, I’m sorry for mentioning grunt-csso — you’re definitely right: I should’n require it in bower.json dependencies as I require it package.json (since I use npm and grunt also for development). I’m quite familiar with Bower at the moment (shower, shower-core, shower-ribbon and shower-bright modules are already published to Bower as part of experiment). So I just fix bower.json and add it to npm branch.

I’m going to start using semver once npm branch will be merged into master.

@ro-ka
Copy link
Author

ro-ka commented Mar 13, 2014

Nice, so they are already on bower now!

@pepelsbey
Copy link
Member

Well, they are not that up to date with npm as they should be ;)

@ro-ka
Copy link
Author

ro-ka commented Mar 13, 2014

Using semver, they will be. :)

@pepelsbey
Copy link
Member

bower.json added to all new package-based branches. Will merge it to master on Tuesday.

@pepelsbey
Copy link
Member

Fixed!

@ro-ka
Copy link
Author

ro-ka commented Mar 24, 2014

Great! :)

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

No branches or pull requests

5 participants