標籤:style blog color 使用 strong 檔案
開發工具目錄結構
--E:\develop\----node-webkit-v0.9.2-win-ia32----Sublime Text 2.0.2 x64
為Sublime text2構建Build環境
開啟sublime text2 菜單->tools->build system->new build system,輸入如下代碼:
{"cmd": ["nw", "${project_path:${folder}}"],"working_dir": "${project_path:${folder}}","path": "E:\\develop\\node-webkit-v0.9.2-win-ia32"}
測試測試代碼目錄結構
--G:\Temp\NodeWebkit-test----index.html----package.json
index.html檔案內容
<!DOCTYPE html><html> <head> <title>Hello World!</title> </head> <body> <h1>Hello World!</h1> We are using node.js <script>document.write(process.version)</script>. <button onclick="js:alert(‘hello‘)">click me</button> </body></html>
package.json檔案內容
{ "name": "nw-demo", "main": "index.html", "window":{ "toolbar":false, "frame":true }}
步驟
- 開啟代碼檔案G:\Temp\NodeWebkit-test\index.html
- 選擇Tools->buildSystem->選中node-webkit
- 選擇Project -> Add Folder to Project加入當前專案檔夾(通過View->Side Bar->Show Side Bar查看)
- 之後每次寫完代碼後點擊tools->build後即可自動調用node-webkit啟動當前的代碼