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

[CLI] Improve readme of a new project #4981

Closed
wants to merge 2 commits into from
Closed

[CLI] Improve readme of a new project #4981

wants to merge 2 commits into from

Conversation

frbuceta
Copy link
Contributor

Until now, new projects and extensions did not have a README file with useful information. I want to put new things to help improve this default file.

Help links, tutorials or examples ... Anything that can help those starting with Loopback

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@@ -226,6 +226,7 @@ module.exports = class ProjectGenerator extends BaseGenerator {
this.destinationPath(''),
{
project: this.projectInfo,
cliVersion,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is cliVersion used in a template?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I am putting a message similar to what Angular says when you create a project with "this has been generated with Loopback CLI version X"

Copy link
Contributor

Choose a reason for hiding this comment

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

Please note we already captures cli version in .yo-rc.json.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know, this that I am putting in the README file only has a visual and informative character. It has no other functionality

Copy link
Contributor

Choose a reason for hiding this comment

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

@frbuceta , thank you for this PR. It is a good idea to add more content to this readme.

Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

@frbuceta, thanks for your PR to beef up the project template. I have a few comments.

@dhmlau dhmlau added community-contribution CLI developer-experience Issues affecting ease of use and overall experience of LB users labels Mar 29, 2020
Copy link
Member

@dhmlau dhmlau left a comment

Choose a reason for hiding this comment

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

LGTM with one minor change.
Please wait for approvals from @raymondfeng and @nabdelgadir to make sure their feedback is addressed. Thanks again @frbuceta.

packages/cli/generators/project/templates/README.md.ejs Outdated Show resolved Hide resolved
packages/cli/generators/project/templates/README.md.ejs Outdated Show resolved Hide resolved
packages/cli/generators/project/templates/README.md.ejs Outdated Show resolved Hide resolved
packages/cli/generators/project/templates/README.md.ejs Outdated Show resolved Hide resolved
@@ -226,6 +226,7 @@ module.exports = class ProjectGenerator extends BaseGenerator {
this.destinationPath(''),
{
project: this.projectInfo,
cliVersion,
Copy link
Contributor

Choose a reason for hiding this comment

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

@frbuceta , thank you for this PR. It is a good idea to add more content to this readme.

@dhmlau
Copy link
Member

dhmlau commented Apr 7, 2020

@emonddr, i'd like to assign this PR to you. Could you please help @frbuceta on this PR so that it can land? Thanks.

@emonddr
Copy link
Contributor

emonddr commented Apr 7, 2020

@frbuceta , looks like you already implemented my suggestions, so I don't need to push any commits to help you along. :)

@emonddr
Copy link
Contributor

emonddr commented Apr 7, 2020

I generated a new application using this updated template.
Here is what it looks like at the moment

image

Based on this image, I have a few other suggestions

  1. Change Run section title to Starting the application
  2. Change CLI Reference to Using CLI Commands

This way all 3 substeps of First Steps have a title that consistently finish with ing .

@frbuceta
Copy link
Contributor Author

frbuceta commented Apr 7, 2020

I generated a new application using this updated template.
Here is what it looks like at the moment

image

Based on this image, I have a few other suggestions

  1. Change Run section title to Starting the application
  2. Change CLI Reference to Using CLI Commands

This way all 3 substeps of First Steps have a title that consistently finish with ing .

I see it by setting the file in MARKDOWN mode and then with the key combination CONTROL + SHIFT + V

Screenshot 2020-04-07 at 18 26 52

@frbuceta
Copy link
Contributor Author

frbuceta commented Apr 7, 2020

We are doing a good job


Refer to [Command-line interface](https://loopback.io/doc/en/lb4/Command-line-interface.html) for the full list of LoopBack 4 commands.

### Adding Additional Dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to mention lb4 upgrade to handle project dependency upgrade for newer LB versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is currently documented at this link

@raymondfeng
Copy link
Contributor

raymondfeng commented Apr 7, 2020

@frbuceta It would be hard to maintain README generation. What about we add a new page to loopback.io to capture the post-scaffolding steps? The README can just have a link to the page so that developers can learn the initial project layout and what they can do as next steps. The page will be a follow-up to https://loopback.io/doc/en/lb4/Getting-started.html.

See #4847

@frbuceta
Copy link
Contributor Author

frbuceta commented Apr 7, 2020

@frbuceta It would be hard to maintain README generation. What about we add a new page to loopback.io to capture the post-scaffolding steps? The README can just have a link to the page so that developers can learn the initial project layout and what they can do as next steps. The page will be a follow-up to https://loopback.io/doc/en/lb4/Getting-started.html.

See #4847

Something like..?

Getting Started

If you are starting we recommend that you start here

First Steps

Starting the application

Starting the application is as easy as:

npm start

....

@raymondfeng
Copy link
Contributor

@frbuceta Yes, what I have in mind is that we generate README with high-level steps, such as:

  • Getting started
  • Try it out the first (ping) API
  • Get familiar with the project
    • Project layout
    • Inside a LoopBack app
  • What's next
    • Add models, datasources, ...
      ...
  • Maintain project license and copyright
  • Upgrade project dependencies
  • Join the community (loopback.io, git, slack, ...)

@frbuceta
Copy link
Contributor Author

frbuceta commented Apr 7, 2020

@frbuceta Yes, what I have in mind is that we generate README with high-level steps, such as:

  • Getting started

  • Try it out the first (ping) API

  • Get familiar with the project

    • Project layout
    • Inside a LoopBack app
  • What's next

    • Add models, datasources, ...
      ...
  • Maintain project license and copyright

  • Upgrade project dependencies

  • Join the community (loopback.io, git, slack, ...)

This would be for the "Get started" page?

@raymondfeng
Copy link
Contributor

This would be for the "Get started" page?

Probably a new page such as Work on your first LoopBack 4 project. The README will have pointers to the new page as follow-up steps after Getting started.

My main point is not to add too much detail the README template. The README should have high-level post scaffold instructions that link to our docs.

@dhmlau dhmlau mentioned this pull request Apr 15, 2020
9 tasks
@dhmlau
Copy link
Member

dhmlau commented Aug 19, 2020

We just switch the contribution method from CLA to DCO, making your contribution easier in the future. Please sign the commits with DCO by amending your commit messages with -s flag and push the changes again. If you're using the command line, you can:

git commit --amend -s
git push --force-with-lease

Please refer to this docs page for details. Thanks!

@frbuceta frbuceta closed this Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI developer-experience Issues affecting ease of use and overall experience of LB users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants