• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

jsmnbom/definitelytyped-firefox-webext-browser: Script to generate TypeScript de ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jsmnbom/definitelytyped-firefox-webext-browser

开源软件地址:

https://github.com/jsmnbom/definitelytyped-firefox-webext-browser

开源编程语言:

TypeScript 99.5%

开源软件介绍:

DefinitelyTyped Firefox WebExt Browser

Script to generate type definitions for WebExtension Development in FireFox.

See the output at: DefinitelyTyped/DefinitelyTyped/types/firefox-webext-browser.

Install definitions using npm install @types/firefox-webext-browser.

Currently based on FIREFOX_78_0b4_RELEASE.

Usage

You should only need to do this if you wanna update the definitions, to just use them, see the npm install line above.

Install dependencies

$ npm install

Build typescript files. Either just once, or optionally watch for files changes. (execute only one of below commands)

$ npm run once
$ npm run watch

Download proper firefox sources to firefox/VERISION. See https://hg.mozilla.org/mozilla-unified/tags for available tags.

$ node build/download.js --tag <TAG> --out <OUTDIR>
$ node build/download.js --tag FIREFOX_63_0b6_RELEASE --out schemas

Then actually generate definitions

$ node build/index.js --version <FIREFOX VERSION> --out <OUTPUT_FILE> [SCHEMA_FOLDER]...
$ node build/index.js --version 63.0 --out index.d.ts schemas/FIREFOX_63_0b6_RELEASE/{browser,toolkit}

And place the generated index.d.ts in DefinitelyTyped/DefinitelyTyped/types/firefox-webext-browser.

Note that for sending PRs to DefinitelyTyped you need to include why you changed. For simple updates (FF version changes), this can be easily generated and uploaded to gist using the included script (requires the gist tool and that you are logged in):

diffgen FIREFOX_63_0b6_RELEASE FIREFOX_64_0b1_RELEASE



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap