-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: pretty print example module #14264
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
build: pretty print example module #14264
Conversation
* In order to debug the example data for the tests on `material.angular.io`, I had to look into the `example-module.ts` output, but it was nearly impossible to read because we don't pretty print the auto-generated code.
.replace('${exampleComponents}', JSON.stringify(exampleComponents)) | ||
.replace('${exampleList}', `[${exampleList}]`) | ||
.replace('${exampleComponents}', JSON.stringify(exampleComponents, null, 2)) | ||
.replace('${exampleList}', `[\n ${exampleList.join(',\n ')}\n]`) |
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.
FYI: we could also use JSON.stringify(X, null, 2)
, but we don't want the elements to be quoted and just joining the lines is faster.
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 debug the example data for the tests on `material.angular.io`, I had to look into the `example-module.ts` output, but it was nearly impossible to read because we don't pretty print the auto-generated code.
* In order to debug the example data for the tests on `material.angular.io`, I had to look into the `example-module.ts` output, but it was nearly impossible to read because we don't pretty print the auto-generated code.
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. |
material.angular.io
, I had to look into theexample-module.ts
output, but it was nearly impossible to read because we don't pretty print the auto-generated code.