-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore(schematics): improve messages for ng-add #13840
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
chore(schematics): improve messages for ng-add #13840
Conversation
In order to make the "failure" or "warning" messages with `ng-add` look more friendly and structured, we manually wrap the messages. Additionally `chalk` is being used more often in order to make it clear if something failed/passed or is just a warning.
85ae3e5
to
83069e3
Compare
@@ -14,7 +14,7 @@ import { | |||
getProjectStyleFile, | |||
hasNgModuleImport, | |||
} from '@angular/cdk/schematics'; | |||
import {red, bold} from 'chalk'; | |||
import {red, bold, italic} from 'chalk'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hadn't thought about this before, but is it a problem that chalk
isn't a dependency of our packages? We went through this with parse5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's technically a dependency but chalk
has been used before my changes AFAIK and we just assumed that chalk
is always present due to the CLI coming with Chalk.
It might be better to be explicit though. Same applies for the @schematics/angular
package we depend on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, doesn't look like the CLI brings chalk
in. It's required by:
"/@babel/highlight",
"/inquirer",
"/postcss",
"/speed-measure-webpack-plugin",
"/tslint"
So kind of brittle. But the same applies for tslint
(for ng-update
) and the aforementioned @schematics/angular
package. I can look in a follow-up for some API's the devkit provides for terminal colors (I think I saw something about that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In order to make the "failure" or "warning" messages with `ng-add` look more friendly and structured, we manually wrap the messages. Additionally `chalk` is being used more often in order to make it clear if something failed/passed or is just a warning.
In order to make the "failure" or "warning" messages with `ng-add` look more friendly and structured, we manually wrap the messages. Additionally `chalk` is being used more often in order to make it clear if something failed/passed or is just a warning.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In order to make the "failure" or "warning" messages with
ng-add
look more friendly and structured, we manually wrap the messages. Additionallychalk
is being used more often in order to make it clear if something failed/passed or is just a warning.