[Javascript] Writing conventional commits with commitizen
Because semantic-release requires a specific message format, it's easier to follow this convention using a tool called commitizen. In this lesson, we'll use it to write our first conventional commit message.
Install:
npm i -D commitizen cz-conventional-changelog
package.json:
{
"czConfig": {
"path": "node_modules/cz-conventional-changelog"
},
"scripts": {
"commit": "git-cz",
"start": "cross-env NODE_ENV=development webpack-dev-server --progress --profile --colors --display-error-details --display-cached --inline",
"test": "cross-env NODE_ENV=test karma start",
"test:single": "cross-env NODE_ENV=test karma start --single-run",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
}
The convention it follows is from angular
Committing a new feature with commitizen
n this lesson, we'll add a new feature to our library and use commitizen to generate our commit message that follows the convention for semantic-release to know it needs to bump the minor version.
npm run commit
It will let you go thoguht few steps of commit message, then you can push to github.
Automatically Releasing with TravisCI
Now that we have everything set up with semantic-release and we have a feature commit, let's push that up and watch TravisCI use semantic-release do our library release automatically.
After you git push to master. Traavis will automatically run the build and tests, if everything pass, then it will automaticlly update the package version number and release the package in github and npm.
[Javascript] Writing conventional commits with commitizen的更多相关文章
- [Javascript] How to write a Javascript libarary
Create package.json file //npm settings npm set init-author-name 'username' npm set init-author-emai ...
- 如何规范git commit提交
相信很多人使用SVN.Git等版本控制工具时候都会觉得每次提交都要写一个注释有什么用啊?好麻烦,所以我每次都是随便写个数字就提交了,但是慢慢的我就发现了,如果项目长期维护或者修改很久之前的项目,没有一 ...
- (转) [it-ebooks]电子书列表
[it-ebooks]电子书列表 [2014]: Learning Objective-C by Developing iPhone Games || Leverage Xcode and Obj ...
- Frontend Development
原文链接: https://github.com/dypsilon/frontend-dev-bookmarks Frontend Development Looking for something ...
- iOS Plugins
iOS Plugins This section provides details for how to implement native plugin code on the iOS platfor ...
- kafka原理和实践(四)spring-kafka消费者源码
系列目录 kafka原理和实践(一)原理:10分钟入门 kafka原理和实践(二)spring-kafka简单实践 kafka原理和实践(三)spring-kafka生产者源码 kafka原理和实践( ...
- git commit template
https://www.zhihu.com/question/27462267/answer/204658544 https://gist.github.com/adeekshith/cd4c95a0 ...
- 在 Git 提交信息中使用 Emoji
Gitmoji 旨在解释如何在 Git 提交消息时使用表情符号.在提交信息时使用表情符号,可以更容易地识别提交的目的或意图. Emoji 列表 :优化项目结构 / 代码格式 :art: ️ :性能提升 ...
- JavaScript Patterns 2.12 Writing API Docs
Free and open source tools for doc generation: the JSDoc Toolkit (http://code.google.com/p/jsdoc-too ...
随机推荐
- 网页布局只mian部分左右固定,中间部分自适应
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- PHP不依赖系统自动执行机制
不依赖系统,以及不依赖yii事物机制,则考虑人为触发.触发可以写在总体的公共页面上,但是考虑到对数据库以及WWW服务器的压力问题,程序的延迟问题,需要对执行函数进行一些优化. 首先,我们考虑对数据库的 ...
- php之利用递归写无限极分类
<?php //无限极分类 //parent 的值,是该栏目的父栏目的id 反之是 /*0 安徽 合肥 北京 海淀 中关村 上地 河北 石家庄 */ $area = array( array(' ...
- Shell 控制并发
方法1: #!/bin/bash c=0 for i in `seq -w 18 31`;do while [ $c -ge 3 ];do c=$(jobs -p |wc -w) sleep 1s d ...
- 在iOS7中修改状态栏字体的颜色-b
状态栏的字体为黑色: UIStatusBarStyleDefault 状态栏的字体为白色: UIStatusBarStyleLightContent 一.在 info.plist 中,将 View ...
- 安装 mysql server
三个月前向公司申请了一台服务器单独给我用,作为部署我写的自动发布工具的服务器.同事不久前在我这台服务器上装了个数据库,今天上去查了一下,用不了,只有information_schema和test两个数 ...
- Guess
uvaLive4255:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&cat ...
- cf D. On Sum of Fractions
http://codeforces.com/problemset/problem/397/D 题意:v(n) 表示小于等于n的最大素数,u(n)表示比n的大的第一个素数,然后求出: 思路:把分数拆分成 ...
- 洛谷1001 A+B Problem
洛谷1001 A+B Problem 本题地址:http://www.luogu.org/problem/show?pid=1001 题目描述 输入两个整数a,b,输出它们的和(|a|,|b|< ...
- CF 85D Sum of Medians (五颗线段树)
http://codeforces.com/problemset/problem/85/D 题意: 给你N(0<N<1e5)次操作,每次操作有3种方式, 1.向集合里加一个数a(0< ...