標籤:使用者資訊 odi htm grunt icon cto ext 事件 瀏覽器
進行環境配置,需要在官網下載git,,node,,ruby,,sass,,grunt,,PHP
連結:https://pan.baidu.com/s/1QAJdd6QOcu0PR5y7F8ID3w 密碼:5oql
具體安裝根據官網說明進行安裝,
其中sass是css的預先處理;grunt是構建工具,PHP是伺服器語言,git是倉庫管理;
git 官網 https://gitscm.com/downloads
node官網: http://nodejs.cn/
ruby官網:https://rubyinstaller.org/
git常用命令
git產生公開金鑰私密金鑰命令:
cd ~/.ssh (尋找電腦上之前有沒有產生) 沒有的話 建立一個檔案 mkdir ~/.ssh
ssh-keygen -t rsa -C ‘郵箱號‘
##產生的公開金鑰在‘~/.ssh/id_rsa.pub’中
全域配置:(使用者資訊)
git config --global user.name ‘使用者名稱‘
git config --global user.meail ‘郵箱號‘
常用命令:
git clone git://github.com/smalot/bootstrap-datetimepicker.git 該隆項目
git init 初始化倉庫
git status 查看當前分支狀態
git add .
git commit -m "ddd" 提交
git pull 下拉倉庫內容
git push 更新
grunt work:b-activity 監聽b-activity項目事件
git publish:專案檔夾 推到遠程倉庫
git branch branchName 建立分支
git checkout branchName 切換分支
git checkout -b branchName 合并子分支到項目分支
npm run dev 在本地瀏覽器開啟
Linux系統常用命令
cd e 進入到一個檔案夾
mkdir <項目名> 建立一個檔案夾或者檔案
cat index.html 顯示index的內容
檔案和目錄
cd /home 進入 ‘/ home‘ 目錄‘
cd .. 返回上一級目錄
cd ../.. 返回上兩級目錄
cd 進入個人的主目錄
cd ~user1 進入個人的主目錄
cd - 返回上次所在的目錄
pwd 顯示工作路徑
ls 查看目錄中的檔案
ls -F 查看目錄中的檔案
ls -l 顯示檔案和目錄的詳細資料
ls -a 顯示隱藏檔案
ls *[0-9]* 顯示包含數位檔案名稱和目錄名
tree 顯示檔案和目錄由根目錄開始的樹形結構(1)
lstree 顯示檔案和目錄由根目錄開始的樹形結構(2)
mkdir dir1 建立一個叫做 ‘dir1‘ 的目錄‘
mkdir dir1 dir2 同時建立兩個目錄
mkdir -p /tmp/dir1/dir2 建立一個分類樹
rm -f file1 刪除一個叫做 ‘file1‘ 的檔案‘
rmdir dir1 刪除一個叫做 ‘dir1‘ 的目錄‘
rm -rf dir1 刪除一個叫做 ‘dir1‘ 的目錄並同時刪除其內容
rm -rf dir1 dir2 同時刪除兩個目錄及它們的內容
mv dir1 new_dir 重新命名/移動 一個目錄
cp file1 file2 複製一個檔案
cp dir/* . 複製一個目錄下的所有檔案到當前工作目錄
cp -a /tmp/dir1 . 複製一個目錄到當前工作目錄
cp -a dir1 dir2 複製一個目錄
ln -s file1 lnk1 建立一個指向檔案或目錄的軟連結
ln file1 lnk1 建立一個指向檔案或目錄的物理連結
touch -t 0712250000 file1 修改一個檔案或目錄的時間戳記 - (YYMMDDhhmm)
file file1 outputs the mime type of the file as text
iconv -l 列出已知的編碼
iconv -f fromEncoding -t toEncoding inputFile > outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding.
find . -maxdepth 1 -name *.jpg -print -exec convert "{}" -resize 80x60 "thumbs/{}" \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick)
git版本控制器