Step 1. 安装node

建议使用nvm安装

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

Step 2. 使用n安装lts版nodejs

node版本管理神器 n

  1. # 需要roo权限
  2. sudo npm i -g n
  3. sudo n lts

Step 3. 安装 yarn

  1. npm i -g yarn

Step 4. 安装 @angular/cli

  1. npm i -g @angular/cli@6.0.0

Step 5. 创建angular项目

添加css预处理器scss angular cli css preprocessor

  1. ng new angular6-demo --style=scss

Step 6. 运行angular

  1. cd angular6-demo
  2. yarn start

Options

  1. # git flow
  2. brew install git-flow
  3. # git msg check
  4. npm i -g commitizen