gulp-tsd !NPM versionnpm-imagenpm-url !Build Statustravis-imagetravis-url !Dependency Statusdaviddm-imagedaviddm-url
Gulp plugin to automate TSD and TypeScript definition related tasksGETTING START
- Install
gulp-tsd
gulp-tsd
npm install --save-dev gulp-tsd
- Write
gulpfile.js
For example;gulpfile.js
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);
});
- Write
gulp_tsd.json
(see blow)
gulp_tsd.json
(see blow)- Write
tsd.json
(see below)
tsd.json
(see below)- Run!
DESCRIPTION
gulptsd.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 throughgulp.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 theDEBUG
environment variable when running gulp tasks like so:DEBUG=gulp-tsd gulp tsd