How to use the tsd.Options function in tsd

To help you get started, we’ve selected a few tsd examples, based on popular ways it is used in public projects.

github teambition / teambition-mobile-web / tools / gulp / tsd.js View on Github external
return co(function * () {
    let npmDependency = require(path.join(process.cwd(), 'package.json'))

    delete npmDependency.dependencies['zone.js']

    let dependencies = ['ionic'].concat(
      Object.keys(npmDependency.dependencies)
    )

    let query = new Tsd.Query()
    dependencies.forEach(function (dependency) {
      query.addNamePattern(dependency)
    })

    let options = new Tsd.Options()
    options.resolveDependencies = true
    options.overwriteFiles = true
    options.saveBundle = true

    yield tsdApi.readConfig()
    let selection = yield tsdApi.select(query, options)
    let installResult = yield tsdApi.install(selection, options)
    let written = Object.keys(installResult.written.dict)
    let removed = Object.keys(installResult.removed.dict)
    let skipped = Object.keys(installResult.skipped.dict)

    written.forEach(function (dts) {
      gutil.log('Definition file written: ' + dts)
    })

    removed.forEach(function (dts) {
github Swiip / generator-gulp-angular / app / templates / gulp / tsd.js View on Github external
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();
  options.resolveDependencies = true;
  options.overwriteFiles = true;
  options.saveBundle = true;

  return tsdApi.readConfig()
    .then(function () {
      return tsdApi.select(query, options);
    })
    .then(function (selection) {
      return tsdApi.install(selection, options);
    })
    .then(function (installResult) {
      var written = Object.keys(installResult.written.dict);
      var removed = Object.keys(installResult.removed.dict);
      var skipped = Object.keys(installResult.skipped.dict);
github angular-starter-kit / starter-kit / gulp / typings.js View on Github external
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;
  options.overwriteFiles = true;
  options.saveBundle = true;
  options.saveToConfig = true;

  return tsdApi.readConfig()
    .then(function() {
      return tsdApi.select(query, options);
    })
    .then(function(selection) {
      return tsdApi.install(selection, options);
    })
    .then(function(installResult) {
      var written = Object.keys(installResult.written.dict);
      var removed = Object.keys(installResult.removed.dict);
      var skipped = Object.keys(installResult.skipped.dict);
github angular-starter-kit / starter-kit / gulp / typings.js View on Github external
.then(function() {
      return tsdApi.reinstall(new tsd.Options());
    })
});
github FlexSearch / FlexSearch / srcjs / gulp / tsd.js View on Github external
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();
    options.resolveDependencies = true;
    options.overwriteFiles = true;
    options.saveBundle = true;

    return tsdApi.readConfig()
      .then(function () {
        return tsdApi.select(query, options);
      })
      .then(function (selection) {
        return tsdApi.install(selection, options);
      })
      .then(function (installResult) {
        var written = Object.keys(installResult.written.dict);
        var removed = Object.keys(installResult.removed.dict);
        var skipped = Object.keys(installResult.skipped.dict);

tsd

Check TypeScript type definitions

MIT
Latest version published 15 days ago

Package Health Score

86 / 100
Full package analysis