- npm install -g typescript http-server
- 把下面三個檔案都載下來放到同一個資料夾
- 在資料夾開啟終端機
- 打上 tsc main.ts --module amd --outfile main.js (指令結束後應該會發現多了一個名為 main.js 的檔案)
- 執行 http-server .
- 瀏覽器打開 http://127.0.0.1:8080/ 理論上會有畫面,之後打開開發者工具在 console 的地方會看到:
hello world !
i am print