如何从github repo安装打字稿定义

编程入门 行业动态 更新时间:2024-10-24 08:23:17
本文介绍了如何从github repo安装打字稿定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何为aurelia-validatejs之类的库安装打字稿defs?

how do you install the typescript defs for a library like aurelia-validatejs?

就像我做了npm install aurelia-validatejs --save一样,将其添加到package.json和node_modules文件夹中.是否有键入命令将打字稿定义放入typings.json和typings/globals文件夹?如果没有,我该怎么办.

Like the I did the npm install aurelia-validatejs --save to add it to the package.json and node_modules folders. Is there a typings command to get the typescript definitions into the typings.json and typings/globals folder? If not how can I do it.

库src和typescript导出位于 aurelia/validatejs github存储库

The library src and typescript exports are located at in the aurelia/validatejs github repo

如果相关,我正在基于 aurelia webpack-typescript框架,我想使validatejs和其他插件正常工作!如果有一篇博客文章显示如何将安装插件插入webpack-typescript skelton中,那将真的很酷.

In case its relevant, I am playing in a project based on the aurelia webpack-typescript skeleton and I want to get validatejs and or other plugins working! It would be really cool if there was a blog post showing how to do plug in installs into the webpack-typescript skelton.

推荐答案

使用命令:

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

或者您可以将其手动添加到您的typings.json文件中:

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" } }

然后运行typings install.

来自文档(请参见有效位置")

From documentation (see "Valid Locations")

aurelia/validatejs-是组织/仓库

dist/aurelia-validatejs.d.ts-是路径

ee3479eb6edacb31e2a1b7fdc8871e615970d293-是提交

更多推荐

如何从github repo安装打字稿定义

本文发布于:2023-07-04 17:22:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1027035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:定义   github   repo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!