This repository has been archived by the owner. It is now read-only.

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

Merged
merged 1 commit into from Oct 16, 2017

Conversation

Projects
None yet
4 participants
@cyrilletuzi
Contributor

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

@googlebot googlebot added the cla: yes label Oct 6, 2017

@cyrilletuzi

This comment has been minimized.

Contributor

cyrilletuzi commented Oct 11, 2017

@hansl

hansl approved these changes Oct 13, 2017

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

6 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: commits Your tests passed on CircleCI!
Details
ci/circleci: integration Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
cla/google All necessary CLAs are signed
@filipesilva

This comment has been minimized.

Member

filipesilva commented Oct 16, 2017

Thanks for fixing this @cyrilletuzi 👍

@cyrilletuzi cyrilletuzi deleted the cyrilletuzi:patch-1 branch Oct 19, 2017

hansl added a commit that referenced this pull request Oct 30, 2017

fix(@schematics/angular): missing condition and comma position
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.