how to install typescript definitions from github repo

最后都变了- 提交于 2019-12-01 23:06:19

With a command:

typings install github:aurelia/validatejs/dist/aurelia-validatejs.d.ts#ee3479eb6edacb31e2a1b7fdc8871e615970d293 --save --global

Or you can manually add it to your typings.json file:

{
    "name": "Test",
    "version": false,
    "globalDependencies": {
        "aurelia-validatejs": "github:aurelia/validatejs/dist/aurelia-validatejs.d.ts#ee3479eb6edacb31e2a1b7fdc8871e615970d293"
    }
}

And run typings install after this.

From documentation (see "Valid Locations")

aurelia/validatejs - is org/repo

dist/aurelia-validatejs.d.ts - is the path

ee3479eb6edacb31e2a1b7fdc8871e615970d293 - is a commit

Use this command, this will surely helpful

typings install package_name --ambient --save

It will save package_name to typings.json, for further reference.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!