>前端項目工程化,是為了更好的進行流程和代碼的管理,包括代碼的合并、壓縮、編譯等。
> 以git和nodejs為基礎,我們可以利用已經存在的模塊,快速的搭建出前端工程化管理的環境
### git的安裝
1. [下載地址](https://git-scm.com/download/win) 下載程序
2. windows程序的普通安裝,安裝之后會自動把git所在的程序目錄添加的環境變量中
3. 設置本地使用git所需的用戶名和電子郵件,替換引號里面的內容為自己的用戶名和電子郵件
~~~
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
~~~
4. 設置記住推送到github等平臺所使用的用戶名和密碼
~~~
git config --global credential.helper store
~~~
### nodejs的安裝
1. [下載地址](http://nodejs.cn/download/) 下載程序
2. 正常安裝,程序會自動添加nodejs的路徑到環境變量
3. 解決網絡延遲,設置安裝源為國內安裝源
~~~
npm config set registry=https://registry.npm.taobao.org
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
npm config set electron_mirror=https://npm.taobao.org/mirrors/electron/
npm config set phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
~~~