Blog

Blog

PHODAL

Bower 包发布

一些时间没有用bower发布包,结果忘了如何去发布一个包,记个笔记方便以后使用。

Bower 发布包

1.初始化

bower init

这个过程中会输入一些信息。我的包是: https://github.com/phodal/showdown-fontawesome

? name: showdown-fontawesome
? version: 0.0.1
? description: Showdown Font Awesome Plugin
? main file: src/icons.js
? what types of modules does this package expose? amd
? keywords: showdown,markdown,font-awesome
? authors: Fengda HUANG <h@phodal.com>
? license: MIT
? homepage: https://github.com/phodal/showdown-fontawesome
? set currently installed components as dependencies? Yes
? add commonly ignored files to ignore list? Yes
? would you like to mark this package as private which prevents it from being accidentally published to the registry? (y/N)? would you like to mark this package as private which prevents it from being accidentally published to the registry? No

{
  name: 'showdown-fontawesome',
  version: '0.0.1',
  homepage: 'https://github.com/phodal/showdown-fontawesome',
  authors: [
    'Fengda HUANG <h@phodal.com>'
  ],
  description: 'Showdown Font Awesome Plugin',
  main: 'src/icons.js',
  moduleType: [
    'amd'
  ],
  keywords: [
    'showdown',
    'markdown',
    'font-awesome'
  ],
  license: 'MIT',
  ignore: [
    '**/.*',
    'node_modules',
    'bower_components',
    'app/bower_components',
    'test',
    'tests'
  ]
}

? Looks good? Yes

2.注册包

  bower register showdown-fontawesome git@github.com:phodal/showdown-fontawesome.git

3.修改bower.json中的版本

4.打tag,如

 git tag v0.0.1

5.push tag

push一个tag

 git push origin v0.0.1

push本地tags

git push --tags

列出所有tag的状态

 git tag -l

6.查看包状态

bower info showdown-fontawesome

或许您还需要下面的文章:

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806
comment

Feeds

RSS / Atom

最近文章

关于作者

Phodal Huang

Developer, Consultant, Writer, Designer

ThoughtWorks 高级咨询师

工程师 / 咨询师 / 作家 / 设计学徒

开源深度爱好者

出版有《前端架构:从入门到微前端》、《自己动手设计物联网》、《全栈应用开发:精益实践》

联系我: h@phodal.com

微信公众号: 与我沟通

标签

最近的一些事

  • 最近我和我的同事们,一起在创建一个新的编程语言:Charj 。它是一个使用 Rust 编写的描述式、中间编程语言。GitHub: https://github.com/datum-lang/datum

    Nov. 14, 2020, 9:27 p.m. | China