fix(@angular/cli): add ng eject with a message about the disabling

Fix #10169
This commit is contained in:
Hans 2018-04-11 17:11:43 -07:00
parent 849a6231c2
commit f2aeb37b51
2 changed files with 35 additions and 7 deletions

View File

@ -0,0 +1,22 @@
import { tags } from '@angular-devkit/core';
import { Command, Option } from '../models/command';
export default class EjectCommand extends Command {
public readonly name = 'eject';
public readonly description = 'Temporarily disabled. Ejects your app and output the proper '
+ 'webpack configuration and scripts.';
public readonly arguments: string[] = [];
public readonly options: Option[] = [];
run(_options: any) {
this.logger.info(tags.stripIndents`
The 'eject' command has been temporarily disabled, as it is not yet compatible with the new
angular.json format. The new configuration format provides further flexibility to modify the
configuration of your workspace without ejecting. Ejection will be re-enabled in a future
release of the CLI.
If you need to eject today, use CLI 1.7 to eject your project.
`);
}
}

View File

@ -8,26 +8,32 @@ const Project = require('../../ember-cli/lib/models/project');
function loadCommands() {
return {
// Schematics commands.
'add': require('../../commands/add').default,
'build': require('../../commands/build').default,
'serve': require('../../commands/serve').default,
'new': require('../../commands/new').default,
'generate': require('../../commands/generate').default,
'update': require('../../commands/update').default,
// Architect commands.
'build': require('../../commands/build').default,
'serve': require('../../commands/serve').default,
'test': require('../../commands/test').default,
'e2e': require('../../commands/e2e').default,
'help': require('../../commands/help').default,
'lint': require('../../commands/lint').default,
'version': require('../../commands/version').default,
'doc': require('../../commands/doc').default,
'xi18n': require('../../commands/xi18n').default,
'update': require('../../commands/update').default,
'run': require('../../commands/run').default,
// Disabled commands.
'eject': require('../../commands/eject').default,
// Easter eggs.
'make-this-awesome': require('../../commands/easter-egg').default,
// Configuration.
// Other.
'config': require('../../commands/config').default,
'help': require('../../commands/help').default,
'version': require('../../commands/version').default,
'doc': require('../../commands/doc').default,
};
}