mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-23 07:19:58 +08:00
37 lines
789 B
TypeScript
37 lines
789 B
TypeScript
const Command = require('../ember-cli/lib/models/command');
|
|
import { UpdateTask } from '../tasks/update';
|
|
|
|
export interface UpdateOptions {
|
|
schematic?: boolean;
|
|
}
|
|
|
|
const UpdateCommand = Command.extend({
|
|
name: 'update',
|
|
description: 'Updates your application.',
|
|
works: 'everywhere',
|
|
availableOptions: [
|
|
{
|
|
name: 'dry-run',
|
|
type: Boolean,
|
|
default: false,
|
|
aliases: ['d'],
|
|
description: 'Run through without making any changes.'
|
|
}
|
|
],
|
|
|
|
anonymousOptions: [],
|
|
|
|
run: function(commandOptions: any) {
|
|
const schematic = '@schematics/package-update:all';
|
|
|
|
const updateTask = new UpdateTask({
|
|
ui: this.ui,
|
|
project: this.project
|
|
});
|
|
|
|
return updateTask.run(schematic, commandOptions);
|
|
}
|
|
});
|
|
|
|
export default UpdateCommand;
|