1.2.5.Install Sublime text Build system
在mac/windows的環境下練習Node.js, 可以利用Sublime text下面的build system直接輸出成果, 但預設沒有支援node.js,這邊筆記作法
For Mac:
1.選擇Tool->Build System->New Build System
2.將設定檔的內容改為:
{ "cmd": ["/usr/local/bin/node", "$file"] }
3.將檔案儲存成Node.js.sublime-build
4.選擇Tool->Build System->Node.js
5.選擇Tool->Build即可顯示console
For Windows:
1,4,5相同
2.將設定檔的內容改為:
{ "cmd": ["C:\\Program Files\\nodejs\\node.exe", "${file}"] }
3.將檔案儲存成Node.js.sublime-build
Last updated
Was this helpful?