Skip to content

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

Merged

Conversation

devversion
Copy link
Member

  • 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.
@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Nov 25, 2018
@devversion devversion requested a review from jelbourn as a code owner November 25, 2018 17:47
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 25, 2018
.replace('${exampleComponents}', JSON.stringify(exampleComponents))
.replace('${exampleList}', `[${exampleList}]`)
.replace('${exampleComponents}', JSON.stringify(exampleComponents, null, 2))
.replace('${exampleList}', `[\n ${exampleList.join(',\n ')}\n]`)
Copy link
Member Author

@devversion devversion Nov 25, 2018

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.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Nov 27, 2018
@jelbourn jelbourn merged commit 42681ee into angular:master Nov 27, 2018
jelbourn pushed a commit that referenced this pull request Dec 3, 2018
* 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.
josephperrott pushed a commit to josephperrott/components that referenced this pull request Jan 14, 2019
* 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.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants