-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat: also generate samples/README.md #214
Changes from 6 commits
e970f59
2d36062
9f68011
a350ddc
6c79113
0835ddb
f3b148b
8dbb7f5
3ceee45
1b57231
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
[//]: # "To regenerate it, use `npm run generate-scaffolding`." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't think we want |
||
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
|
||
# [{{ metadata['repo']['name_pretty'] }}: {{ metadata['repo']['language']|language_pretty }} Samples](https://github.com/{{ metadata['repo']['repo'] }}) | ||
|
||
[![Open in Cloud Shell][shell_img]][shell_link] | ||
|
||
{{ metadata['partials'] and metadata['partials']['introduction'] }} | ||
|
||
## Table of Contents | ||
|
||
* [Before you begin](#before-you-begin) | ||
* [Samples](#samples){% if metadata['samples']|length %}{% for sample in metadata['samples'] %} | ||
* [{{ sample.name }}](#{{ sample.name|slugify }}){% endfor %}{% endif %} | ||
|
||
## Before you begin | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this README has been simplified, the need for executing samples to generate |
||
Before running the samples, make sure you've followed the steps in the | ||
[Using the client library](https://github.com/{{ metadata['repo']['repo'] }}#using-the-client-library) of the client | ||
library's README. | ||
|
||
## Samples | ||
{% if metadata['samples']|length %} | ||
{% for sample in metadata['samples'] %} | ||
|
||
### {{sample.name}} | ||
|
||
View the [source code](https://github.com/{{ metadata['repo']['repo'] }}/blob/master/samples/{{ sample.file }}). | ||
|
||
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/{{ metadata['repo']['repo'] }}&page=editor&open_in_editor=samples/{{ sample.file }},samples/README.md) | ||
|
||
__Usage:__ | ||
|
||
See available commands: | ||
|
||
`node {{ sample.file }} --help` | ||
|
||
Run the sample: | ||
|
||
`node {{ sample.file }} [command] [options]` | ||
|
||
{% if not loop.last %} | ||
----- | ||
{% endif %} | ||
|
||
{% endfor %} | ||
{% endif %} | ||
|
||
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/{{ metadata['repo']['repo'] }}&page=editor&open_in_editor=samples/README.md |
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.
we don't want to generate the new README until we've plopped a
.repo-metadata.json
in the folder, otherwise we get a junk file.