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

moznion/gulp-tsd: Gulp plugin to automate TSD and TypeScript definition related ...

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

开源软件名称(OpenSource Name):

moznion/gulp-tsd

开源软件地址(OpenSource Url):

https://github.com/moznion/gulp-tsd

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

gulp-tsd NPM version Build Status Dependency Status

Gulp plugin to automate TSD and TypeScript definition related tasks

GETTING START

1. Install gulp-tsd

npm install --save-dev gulp-tsd

2. Write gulpfile.js

For example;

var tsd = require('gulp-tsd');

gulp.task('tsd', function () {
    return gulp.src('./gulp_tsd.json').pipe(tsd());
});

or if you want to specify your options inline in your gulpfile

var tsd = require('gulp-tsd');

gulp.task('tsd', function (callback) {
    tsd({
        command: 'reinstall',
        config: './tsd.json'
    }, callback);
});

3. Write gulp_tsd.json (see blow)

4. Write tsd.json (see below)

5. Run!

DESCRIPTION

gulp_tsd.json (convenient name, you can give a name as you like)

Setting file for this plugin. Pass this file to entry point of this plugin through gulp.src.

e.g.

    {
        "command": "reinstall", // this plugin supports only "reinstall"
        "latest": true,         // if this property is true, tsd always fetches HEAD definitions
        "config": "./tsd.json", // file path for configuration file (see below)
        "opts": {
            // options, EXPERIMENTAL
        }
    }

tsd.json (convenient name, you can give a name as you like)

Configuration file for tsd. Specify this file by setting json (yes, above one).

e.g.

{
    "version": "v4",
    "repo": "borisyankov/DefinitelyTyped",
    "ref": "master",
    "path": "typings",
    "bundle": "typings/tsd.d.ts",
    "installed": {
        "jquery/jquery.d.ts": {
            "commit": "0de1592ef9e3144b925287ca0494f621e12b01c6"
        }
    }
}

Please refer to the tsd.json to get more information.

DEBUGGING

This library uses the popular debug module for debugging. To enable logging, set the DEBUG environment variable when running gulp tasks like so:

DEBUG=gulp-tsd gulp tsd

NOTES

A lot of codes are from grunt-tsd. Thanks.

SEE ALSO

LICENSE

MIT




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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