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

Register Bower Package Without Separate Repo #33

Closed
mjhasbach opened this issue Dec 21, 2015 · 5 comments
Closed

Register Bower Package Without Separate Repo #33

mjhasbach opened this issue Dec 21, 2015 · 5 comments

Comments

@mjhasbach
Copy link
Contributor

release-script has support for Bower, but it involves having a separate Bower repo.

  • I have several UMD packages
  • I keep all of the files in the same repo and use .npmignore and bower.json's ignore to include the appropriate files based on the package manager
  • After creating a new UMD package, I use release major --run to release the package on GitHub / NPM and bower register to release the package on Bower

Upon running release, it would be cool if release-script:

  • Checked for the presence of bower.json
  • bower registered the package unless...
    • The Bower package exists (my package bower-package-url may be useful here)
    • package.json's release-script.bowerRepo exists
@AlexKVal
Copy link
Owner

The whole idea behind this project is for those who needs exactly a separate bower repo 😄

If you don't need a separate repo for bower then you just don't need this release-script 😉
In that case you could simply do it in your npm's scripts. Like this:

"scripts": {
  "release": "npm run test && npm run build && npm publish",
  "test": "...",
  "build": "..."

bower gets "published" automatically by git tag-ging. That's simple and no any additional dev-dependency needed.

You've got the idea.

This project was created as a result of refactoring at React-Bootstrap project when it was decided to
pull the bower repo out into its own separate one.

Therefore it seems that these additions would be at least questionable and "downgrading" to this project.
What do you think ?

@mjhasbach
Copy link
Contributor Author

In that case you could simply do it in your npm's scripts. Like this:

"scripts": {
  "release": "npm run test && npm run build && npm publish",
  "test": "...",
  "build": "..."

However, that example wouldn't handle version bumping. I suppose I could use npm-version for that, but I would end up with 3 boilerplate scripts (patch, minor, and major) for each project. It also would not handle Git tagging and GitHub releasing, which are features I really like about release-script.

bower gets "published" automatically by git tag-ging.

I still need to run bower register once to add the repo to the registry. That was the step I wanted automated.

Therefore it seems that these additions would be at least questionable and "downgrading" to this project.
What do you think ?

I do not think it would be "downgrading" as long as this feature is implemented in a way that does not change existing functionality. A possible solution is described above. Most libraries that I have seen use the same repository for NPM and Bower, so I think many people could potentially benefit from this feature.

@AlexKVal
Copy link
Owner

I apologize for taking so long to answer (busy days) 😊
Ok. Let's try your proposal.
Could you make a PR with it ? ❇️

It will take more than a week for me to do it.
(the time when I get to github to check out what's new on oss projects I'm monitoring, my brain is already so tired that I am not able to produce anything serious these days)

Or you could just wait for a couple of weeks o/c 🍒

@AlexKVal
Copy link
Owner

AlexKVal commented Jan 3, 2016

@mjhasbach what do you think about https://github.com/mzabriskie/rf-release for this case ?

@mjhasbach
Copy link
Contributor Author

That package updates the deprecated version property in bower.json. It doesn't bower register the package. I'll submit a PR for this issue soon.

mjhasbach added a commit to mjhasbach/release-script that referenced this issue Jan 5, 2016
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

No branches or pull requests

2 participants