Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commands): throw when init command is called with mobile flag #2753

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/angular-cli/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ const InitCommand: any = Command.extend({
new SilentError('We currently do not support a name of `' + packageName + '`.'));
}

if (commandOptions.mobile) {
return Promise.reject(new SilentError(
'The --mobile flag has been disabled temporarily while we await an update of ' +
'angular-universal for supporting NgModule. Sorry for the inconvenience.'
));
}

blueprintOpts.blueprint = normalizeBlueprint(blueprintOpts.blueprint);

return installBlueprint.run(blueprintOpts)
Expand Down
9 changes: 2 additions & 7 deletions tests/acceptance/init.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,8 @@ describe('Acceptance: ng init', function () {
]).then(confirmBlueprinted);
});

it('ng init --mobile', () => {
return ng([
'init',
'--skip-npm',
'--skip-bower',
'--mobile'
]).then(() => confirmBlueprinted(true));
it('ng init with mobile flag does throw exception', function () {
expect(ng(['init', '--mobile'])).to.throw;
});

it('ng init can run in created folder', function () {
Expand Down