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

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

merged 1 commit into from Oct 16, 2017


None yet
4 participants

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


This comment has been minimized.


cyrilletuzi commented Oct 11, 2017


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!
ci/circleci: commits Your tests passed on CircleCI!
ci/circleci: integration Your tests passed on CircleCI!
ci/circleci: lint Your tests passed on CircleCI!
ci/circleci: test Your tests passed on CircleCI!
cla/google All necessary CLAs are signed

This comment has been minimized.


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.