[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 ...
随机推荐
- Servlet监听器类型
------------------------serlvet对象监听器------------------------------------------- request监听器(ServletRe ...
- xubuntu14.04截图,彻底到Linux一个半月后记
前言 自学计算机技术,越到后面,越依赖ubuntu,以致于很多时候都是一开机就打开虚拟机上的ubuntu10.04,Linux已经变得越来越重要了. 2014-04-17,ubuntu14.0 ...
- HTML5画布
- NPOI读写Excel0307
#region NPOI 操作 Excel 2007 /// <summary> /// 将Excel文件中的数据读出到DataTable中(xlsx) /// </summary& ...
- C#遍历窗体控件(原文出自http://www.liangshunet.com/ca/201403/286434593.htm)
一.C#遍历窗体控件 主要遍历属于窗体(Form)的控件(Controls),假如窗体中有 Panel.Button 和 TextBox 控件,遍历代码如下: /// <summary> ...
- php里 \r\n换行问题
<?php echo "hello"; echo "\r\n"; echo "world"; ?> 在浏览器输出的是hello ...
- mysql数据类型——浮点和定点型
mysql数据类型 字节 含义 float(m,d) 4字节 单精度浮点型,8位精度,m是十进制数字的总个数,d是小数点后面的数字个数 double(m,d) 8字 ...
- XAMPP配置虚拟主机
当你在本地进行单个网站建设和测试的时候,你只需要正常的安装一下XAMPP就好了.XAMPP本身是集成了apache.mysql和php的.然而当你本地测试站点一多的话,你就不得不考虑使用多个虚拟主机来 ...
- 使用$.getJSON实现跨域ajax请求
jQuery中常用getJSON来调用并获取远程的JSON字符串,将其转换为JSON对象,如果成功,则执行回调函数.原型如下: jQuery.getJSON( url, [data], [callba ...
- HDU1106
为了给学弟学妹讲课,我又水了一题-- 1: import java.util.*; 2: import java.io.*; 3: 4: public class HDU1106 5: { 6: pu ...