Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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) {
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);
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);
.then(function() {
return tsdApi.reinstall(new tsd.Options());
})
});
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);