Homebrew Mac软件包管理器
苹果电脑标准安装脚本
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
Homebrew国内源:https://gitee.com/cunkai/HomebrewCN
node
安装
brew install node
nrm 镜像源管理工具
npm install -g nrm # 安装
nrm use taobao # 切换taobao源
常见命令
nrm ls # 列出可选的源
nrm test # 测试所有源速度
nrm test npm # 测试单源速度
git
安装
brew install git
配置git
设置username和email
git config --global user.name "xlx"
git config --global user.email "[email protected]"
创建ssh key
ssh-keygen -t rsa -C "[email protected]"
git-cz 规范化提交
npm全局安装
npm install -g git-cz
自定义配置文件
放在项目根目录或者任何父级目录
changelog.config.js
module.exports = {
disableEmoji: true,
// format: '{type}{scope}: {emoji}{subject}',
list: ['feat', 'fix', 'style', 'docs', 'chore','test', 'perf','refactor', 'ci'],
maxMessageLength: 64,
minMessageLength: 3,
questions: ['type', 'scope', 'subject', 'body', 'breaking', 'issues', 'lerna'],
scopes: [],
types: {
chore: {
description: '一些与主要业务无关的构建/工程依赖/工具等功能改动',
emoji: '🤖',
value: 'chore'
},
ci: {
description: 'CI related changes',
emoji: '🎡',
value: 'ci'
},
docs: {
description: '文档更新(如:README)',
emoji: '📃',
value: 'docs'
},
feat: {
description: '新的特性',
emoji: '🎸',
value: 'feat'
},
fix: {
description: 'bug 修复',
emoji: '🐛',
value: 'fix'
},
perf: {
description: '优化了性能的代码改动',
emoji: '⚡️',
value: 'perf'
},
refactor: {
description: '代码重构',
emoji: '💡',
value: 'refactor'
},
release: {
description: 'Create a release commit',
emoji: '🏹',
value: 'release'
},
style: {
description: '代码的格式美化',
emoji: '💄',
value: 'style'
},
test: {
description: '新增或修改已有的测试代码',
emoji: '💍',
value: 'test'
}
}
};
iTerm2
brew install --cask iterm2
oh-my-zsh
curl 安装(Gitee国内镜像)
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
wget 安装(Gitee国内镜像)
sh -c "$(wget -O- https://gitee.com/pocmon/mirrors/raw/master/tools/install.sh)"
zsh-autosuggestions 命令自动补全插件
安装
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
修改 .zshrc文件 添加插件
plugins=(git zsh-autosuggestions)
Fig 终端自动命令提示工具
安装
brew install fig
https://github.com/withfig/autocomplete
docker
安装
brew install --cask --appdir=/Applications docker