<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                起初編寫完TypeScript后是在命令行工具下編譯ts文件,后來發現ts文件內容一旦發生改變就要手動去執行編譯命令,難免降低了工作效率。后來發現原來強大的Webstorm?IDE也可以開發TypeScript,還支持自動編譯成js文件。 下面說一下完整的設置步驟吧 1.去node.js官網下載安裝node.js 2.下載安裝新版本的Webstorm 3.使用node的npm命令安裝typeScript編譯器 npm install typescript -g 安裝好,在命令行可以查看編譯器的版本 tsc -v 4.打開Webstorm,新建一個空白項目,命名為TypeScriptPro\_01 ![](//upload-images.jianshu.io/upload_images/5613607-927941b9e23d8b98.png?imageMogr2/auto-orient/strip|imageView2/2/w/797/format/webp) 5.在Webstorm中右擊項目名,選擇new->tsconfig.json File,創建tsconfig.json文件 ![](//upload-images.jianshu.io/upload_images/5613607-4b1e96b1acffae48.png?imageMogr2/auto-orient/strip|imageView2/2/w/812/format/webp) 6.打開Webstorm,為TypeScript文件更改編譯設置,File->Settings->File Watchers->TypeScript,這里我們需要選擇TypeScript,但是 File Watchers下默認是不存在的。需要點擊右側“+”號,選擇,彈出 New Watcher,設置好圈紅線的部分,點擊ok。勾 選“TypeScript”,點擊ok。 ![](//upload-images.jianshu.io/upload_images/5613607-e72f99c33bef743f.png?imageMogr2/auto-orient/strip|imageView2/2/w/1174/format/webp) ![](//upload-images.jianshu.io/upload_images/5613607-bfd5ba6a9812eb2d.png?imageMogr2/auto-orient/strip|imageView2/2/w/637/format/webp) ``` Program:D:\\tools\\Ionic\\nodejs\\tsc.cmd Arguments:--sourcemap --target "ES5" Output paths to refresh:$FileNameWithoutExtension$.js:$FileNameWithoutExtension$.js.map Working directory:$FileDir$ ``` 7.設置typescript自動編譯,勾選下圖圈紅線的位置。 ![](//upload-images.jianshu.io/upload_images/5613607-ab2cc3542c285661.png?imageMogr2/auto-orient/strip|imageView2/2/w/1037/format/webp) 這樣,typescript的自動編譯功能就設置好了,測試一下,很帶勁,你只需要負責寫ts就好了,的確方便了很多。 ![](//upload-images.jianshu.io/upload_images/5613607-fb86939068b295cf.png?imageMogr2/auto-orient/strip|imageView2/2/w/928/format/webp) 作者:Arvin627 鏈接:https://www.jianshu.com/p/310eaba45d99 來源:簡書 著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看