3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

自作のjavascrptのプラグインをbowerに載せる方法

Last updated at Posted at 2015-10-21

自作のjavascriptのプラグインをbowerに載せる方法

経緯

というプラグインを作った話を書きましたが、bower対応もしたので、そのメモ

作り方

bower.jsonの作成

プロジェクトのディレクトリで以下のコマンドを叩く。

bower init

基本Enter連打でいいと思う

普通にgitでリポジトリの作成

git init
git add .
git commit -m 'first commit'
git remote add master git://github.com/nmbakfm/toggleForm.git
git push -u origin master

タグの追加

以下のコマンドを叩く。ここで、0.0.0はbower.jsonに記述した値。

git tag 0.0.0
git push origin 0.0.0

bowerに登録

bower register toggleForm git://github.com/nmbakfm/toggleForm.git

ここでのURLはgit://で始まらないとダメという記事を見かけた。どこで見たかは失念。うまくいかなかったらhttps://とかで上手くいかなかったら、修正してみてください。

ちゃんと動いてるかチェック

適当にディレクトリを作って、

bower init
bower install toggleForm -S

みたいにしてちゃんとできているかどうかをチェックする。

まとめ

意外と簡単なので、せっかく作ったライブラリがあれば、bowerに登録してみてもいいのではないでしょうか。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?