Register Bower Package Without Separate Repo
mjhasbach opened this issue ยท 5 comments
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
andbower.json
'signore
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 andbower 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 register
ed the package unless...- The Bower package exists (my package bower-package-url may be useful here)
package.json
'srelease-script.bowerRepo
exists
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 ?
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.
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 ๐
@mjhasbach what do you think about https://github.com/mzabriskie/rf-release for this case ?
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.