Skip to content
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

Improve the generated README.md to be close to Track 2's #895

Closed
wants to merge 6 commits into from

Conversation

deyaaeldeen
Copy link
Member

@deyaaeldeen deyaaeldeen commented Apr 1, 2021

This PR improves the generated README.md to be close to Track 2's ones. In particular:

  • Generates required sections: Getting Started, Key Concepts, Troubleshooting, Next Steps, Contributing, and Related Projects.
  • If the generation is not for an Azure package, Azure-specific information is omitted.

Example: Azure/azure-sdk-for-js#14655
Related issue: https://github.com/Azure/azure-sdk-for-js/issues/14449
Swagger

Fixes #594


- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
## Key concepts
Copy link
Member

Choose a reason for hiding this comment

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

Maybe here we can add a reference to Identity so users can refer to to learn how to authenticate

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a reference to the docs for the DefaultAzureCredential here. However, I am not sure if @ramya-rao-a wants to keep it. We can continue the discussion in Azure/azure-sdk-for-js#14655.

Copy link
Member

@joheredi joheredi left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for taking on this work 😄 just left a small comment about including a reference to Identity docs

* @returns the required getting started section in the readme file
*/
function writeGettingStarted(metadata: Metadata): string {
const text = `## Getting started
Copy link
Member

@maorleger maorleger Apr 1, 2021

Choose a reason for hiding this comment

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

I have a bit of a general question (for anyone, not specific to this PR) - is it common that we put all the text inline like this when generating static files? Have we explored simple templating engines (remarkable?, handlebars, ejs, etc)

I'm not proposing we go all-in on super complex templates I'm just wondering if that's been explored at all just to separate content/layout from data and (for one example) avoid having to escape backticks everywhere

Copy link
Member

Choose a reason for hiding this comment

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

We used to have template, if I recall correctly we moved to ts-morph as it allows more flexibility by crafting TS programmatically (@daviwil can correct me here). It may be interesting to do templates for static files though as they are usually not complex.

@deyaaeldeen
Copy link
Member Author

Closing in favor of #971.

@deyaaeldeen deyaaeldeen deleted the update-readme branch May 28, 2021 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v6] Generate useful README files
3 participants