'端口'aurelia-skeleton-navigation到打字稿

时间:2015-09-18 12:24:56

标签: javascript typescript aurelia

我在this guide之后安装了aurelia-skeleton-navigation。但是,我想开始使用Typescript进行开发。如何才能实现这一目标?我想只需将文件扩展名更改为* .ts并使用tsc进行编译就不够了。

有太多的资源,但每次我试一试时,我似乎总是遇到麻烦。

希望有人能指出我正确的方向。 我把它推到github - 随时帮忙。

PS:我知道有一个或两个已经完成此操作的存储库,但我真的很想了解如何将其移植到使用打字稿的基础知识。

2 个答案:

答案 0 :(得分:4)

所以这里有一些步骤:

  1. .js个文件重命名为.ts个文件

  2. 设置gulp步骤将您的.ts文件转换为.js个文件

      

    看一下这个gulp-typescript gulp task作为参考

  3. 注意:您需要在上面的gulp步骤中添加paths.d.ts存储库的dist文件夹中找到的jspm_packages/github/aurelia/*/dist/*.d.ts个文件。该路径类似于:fetch-client

    同样棘手:对于path,您可能还需要在whatwg-fetch.d.ts类型定义中添加fetch-client/doc(在default: adapter: mysql2 host: xxx.xxx.xxx.xxx password: root pool: 5 timeout: 5000 username: root development: adapter: mysql2 database: abc encoding: utf8 host: xxx.xxx.xxx.xxx password: root pool: 5 timeout: 5000 username: root log_database_development: adapter: mysql2 database: abc_logs encoding: utf8 host: xxx.xxx.xxx.xxx password: root pool: 5 timeout: 5000 username: root log_database_test: adapter: mysql2 database: abc_logs encoding: utf8 host: xxx.xxx.xxx.xxx password: root pool: 5 timeout: 5000 username: root test: adapter: mysql2 database: abc encoding: utf8 host: xxx.xxx.xxx.xxx password: root pool: 5 timeout: 5000 username: root 中找到)

答案 1 :(得分:1)

迟到了,但我已经完成了这一步并记录了我将骨架项目移到打字稿上所采取的所有步骤http://www.eriklieben.com/aurelia-skeleton-navigation-to-typescript/

相关问题