前端开发环境搭建 (version 2)
admin
2024-01-31 13:40:29

安装 git

- ssh 配置

        生成: ssh-keygen -t rsa -C"you_email"

        添加:ssh-add ~/.ssh/id_rsa

-username email

        git config --global user.name "username"

        git config --global user.email  useremail@mail.com

安装 zsh

-安装命令:curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh

-设置默认使用zsh Mac终端神器zsh - 掘金

-插件 ()

        新建文件夹 “~/.oh-my-zsh/myPlugins/" 并切到这里

        git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

        git clone https://github.com/zsh-users/zsh-autosuggestion

-.zshrc

ZSH_THEME="ys"
source  ~/.bash_profile
source $ZSH/oh-my-zsh.sh
source ~/.oh-my-zsh/myPlugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.oh-my-zsh/myPlugins/zsh-autosuggestions/zsh-autosuggestions.zsh
plugins=(gitzsh-syntax-highlightingzsh-autosuggestions
)

-.bash_profile

[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"# brew
export PATH=$PATH:/opt/homebrew/bin
export PATH=$PATH:/opt/homebrew/sbin
export HOMEBREW_NO_AUTO_UPDATE=true# >>> zsh
export ZSH="/Users/xxx/.oh-my-zsh"# >>> vscose
alias code="/Applications/Visual\ Studio\ Code.app//Contents/Resources/app/bin/code"export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion


        

安装brew

安装指南:The Missing Package Manager for macOS (or Linux) — Homebrew

- 必备软件

        brew install nginx

        brew install minicodaMacOS 使用miniconda 虚拟环境 TensorFlow深度学习环境_yanghaoyuan.sh的博客-CSDN博客

- 权限

        cd /opt

        sudo chmod -R 777 ./homebrew

安装nvm

GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

- 全局插件必备

        npm install -g @angular/cli http-server  @vue/cli  create-react-app conventional-changelog-cli pm2 sinopia

VScode

-settings.json

{// "editor.detectIndentation": false,"editor.renderWhitespace": "none","editor.fontSize": 14,"editor.fontFamily": "'Courier New', Monaco, monospace, Menlo ","editor.tabSize": 2,//这里是系统界面字体大小"window.zoomLevel": 0.7,"workbench.iconTheme": "vscode-icons","js/ts.implicitProjectConfig.strictNullChecks": true,"js/ts.implicitProjectConfig.experimentalDecorators": true,// 取消自动格式化"editor.formatOnType": false,"editor.formatOnSave": false,"json.format.enable": false,"html.format.enable": false,"typescript.format.enable": false,"javascript.format.enable": false,"editor.suggestSelection": "first","vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue","workbench.editorAssociations": {"*.ipynb": "jupyter-notebook"},"notebook.cellToolbarLocation": {"default": "right","jupyter-notebook": "left"},"vsicons.dontShowNewVersionMessage": true,// 同源策略"http.proxyAuthorization": "false","git.autofetch": true,"[html]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"update.mode": "none","breadcrumbs.enabled": false,"[typescript]": {"editor.defaultFormatter": "esbenp.prettier-vscode"},"typescript.updateImportsOnFileMove.enabled": "always","javascript.updateImportsOnFileMove.enabled": "always","[scss]": {"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"}
}

-插件:

        angualr files , angular language service, angulr support , auto close tag , auto import , git graph,  git history, gitlens, html css support, html snippets, npm intellisense, open in browser, prettier, prettier eslint, tslint, to do hilight, vscode-icons.

macos 截屏设置

// 设置默认保存位置
defaults write com.apple.screencapture location /Users/xx/ScreenShot// 设置名字
defaults write com.apple.screencapture name screen_shot// 去掉日期后缀
defaults write com.apple.screencapture "include-date" 0killall SystemUIServer

相关内容

热门资讯

关于中金新璟3个月定期开放债券... 根据中金基金管理有限公司(以下简称“本公司”)于2025年12月17日发布的《关于中金新璟3个月定期...
甘肃渭源检察全面加强青年干警队... (来源:法治日报)转自:法治日报近年来,甘肃省定西市渭源县人民检察院紧扣“实干担当、争先出彩”主题,...
资本市场退市改革显著深化 (来源:中华工商时报)转自:中华工商时报    退市制度作为资本市场关键的基础性制度,其核心价值在于...
北京新时空科技股份有限公司关于... 证券代码:605178 证券简称:时空科技 公告编号:2025-092北京新时空科技股份有限公司关...
有关回忆的非主流落寞签名 非主... 1、在生死轮回的碰撞中、是否我们曾擦肩而过 2、我不会依赖别人,因为我受够了失望。 3、...