Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('tsd', function() {
var tsdAPI = tsd.getAPI('tsd.json');
return tsdAPI.readConfig({}, true).then(function() {
return tsdAPI.reinstall(
tsd.Options.fromJSON({}) // https://github.com/DefinitelyTyped/tsd/blob/bb2dc91ad64f159298657805154259f9e68ea8a6/src/tsd/Options.ts
).then(function() {
return tsdAPI.updateBundle(tsdAPI.context.config.bundle, true);
});
});
});
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var path = require('path');
var tsd = require('tsd');
var tsdJson = 'tsd.json';
var tsdApi = new tsd.getAPI(tsdJson);
module.exports = function() {
gulp.task('tsd:install', function () {
var bower = require(path.join(process.cwd(), 'bower.json'));
var dependencies = [].concat(
Object.keys(bower.dependencies),
Object.keys(bower.devDependencies)
);
var query = new tsd.Query();
dependencies.forEach(function (dependency) {
query.addNamePattern(dependency);
});
var options = new tsd.Options();
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var path = require('path');
var tsd = require('tsd');
var tsdJson = 'tsd.json';
var tsdApi = new tsd.getAPI(tsdJson);
gulp.task('tsd:install', function () {
var bower = require(path.join(process.cwd(), 'bower.json'));
var dependencies = [].concat(
Object.keys(bower.dependencies),
Object.keys(bower.devDependencies)
);
var query = new tsd.Query();
dependencies.forEach(function (dependency) {
query.addNamePattern(dependency);
});
query.addNamePattern('karma-jasmine');
var options = new tsd.Options();
'use strict';
var gulp = require('gulp');
var conf = require('../gulpfile.config');
var gutil = require('gulp-util');
var path = require('path');
var tsd = require('tsd');
var tsdJson = 'tsd.json';
var tsdApi = new tsd.getAPI(tsdJson);
gulp.task('tsd', function() {
var bower = require(path.join(process.cwd(), 'bower.json'));
var dependencies = [].concat(
Object.keys(bower.dependencies),
Object.keys(bower.devDependencies)
);
var query = new tsd.Query();
dependencies.forEach(function(dependency) {
query.addNamePattern(dependency);
});
var options = new tsd.Options();
options.resolveDependencies = true;
function getAPI(options) {
grunt.log.writeln('-> config: ' + options.config);
var api = tsd.getAPI(options.config, grunt.option('verbose'));
if (options.cacheDir) {
grunt.log.writeln('cacheDir: ' + options.cacheDir);
api.context.paths.cacheDir = path.resolve(options.cacheDir);
}
return api;
}
function getAPI(setting) {
logger.log('config:', setting.config);
var api = tsd.getAPI(setting.config);
if (setting.cacheDir) {
logger.log('cacheDir:', setting.cacheDir);
api.context.paths.cacheDir = path.resolve(setting.cacheDir);
}
return api;
}