Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

feat(@schematics/angular): save ng new options as defaults #196

Merged
merged 1 commit into from
Oct 16, 2017
Merged

feat(@schematics/angular): save ng new options as defaults #196

merged 1 commit into from
Oct 16, 2017

Conversation

cyrilletuzi
Copy link
Contributor

@cyrilletuzi cyrilletuzi commented Oct 6, 2017

If I create an app with the CLI with the --inline-template option, I don't just want the AppComponent with inline template, I surely want inline templates everywhere.

Same goes for --inline-style and --skip-tests.

So this PR save the options used during ng new, which are related to future generate commands, as defaults in .angular-cli.json.

This is particularly helpful for beginners : skipping tests (= less files to mess with) and inlining templates (easier to see relations between class and view) is better to learn at first, but having to reconfigure the .angular-cli.json after the ng new is cumbersome, especially when people don't understand yet at this time what they are configuring.

I just need confirmation that || and && operators work here, but I suppose the tests will answer this question.

Fixes angular/angular-cli#8004

@cyrilletuzi
Copy link
Contributor Author

@Brocco @hansl

@filipesilva filipesilva merged commit 634d04b into angular:master Oct 16, 2017
@filipesilva
Copy link
Contributor

Thanks for fixing this @cyrilletuzi 👍

@cyrilletuzi cyrilletuzi deleted the patch-1 branch October 19, 2017 08:08
hansl pushed a commit that referenced this pull request Oct 30, 2017
Fixes PR #213 which sorted the options without taking the conditions into consideration, resulting in `class: { spec: false }` for everyone.

Fixes PR #196 comma position.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants