From 7d3468b524a9f4fa23dc99a9adb94ff47b392e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 8 Feb 2018 15:14:52 +0100 Subject: [PATCH 1/2] lb4: describe "lb4 example" command --- _data/sidebars/lb4_sidebar.yml | 10 +++-- _includes/content/lb4-artifact-commands.html | 4 +- _includes/content/lb4-project-commands.html | 12 ++++-- pages/en/lb4/Download-examples.md | 43 ++++++++++++++++++++ 4 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 pages/en/lb4/Download-examples.md diff --git a/_data/sidebars/lb4_sidebar.yml b/_data/sidebars/lb4_sidebar.yml index 395dd85c4..069b4f11b 100644 --- a/_data/sidebars/lb4_sidebar.yml +++ b/_data/sidebars/lb4_sidebar.yml @@ -32,7 +32,7 @@ children: - title: 'Application' url: Application.html output: 'web, pdf' - + - title: 'Server' url: Server.html output: 'web, pdf' @@ -93,11 +93,15 @@ children: - title: 'Application generator' url: Application-generator.html output: 'web, pdf' - + - title: 'Controller generator' url: Controller-generator.html output: 'web, pdf' + - title: 'Download examples' + url: Download-examples.html + output: 'web, pdf' + - title: 'Best practices with Loopback 4' url: Best-practices-with-Loopback-4.html output: 'web, pdf' @@ -156,7 +160,7 @@ children: - title: 'FAQ' url: FAQ.html output: 'web, pdf' - + - title: 'Reference' url: Reference.html output: 'web, pdf' diff --git a/_includes/content/lb4-artifact-commands.html b/_includes/content/lb4-artifact-commands.html index cfeb5a096..9ddd9ecfb 100644 --- a/_includes/content/lb4-artifact-commands.html +++ b/_includes/content/lb4-artifact-commands.html @@ -1,12 +1,12 @@ - + - diff --git a/_includes/content/lb4-project-commands.html b/_includes/content/lb4-project-commands.html index 2c564ec89..1d7869b95 100644 --- a/_includes/content/lb4-project-commands.html +++ b/_includes/content/lb4-project-commands.html @@ -1,14 +1,20 @@
CommandsCommands Description See
lb4 controller +lb4 controller Add a new controller to a LoopBack 4 application Controller generator
- + - + + +
CommandsCommands Description See
lb4 +lb4 Create a new LoopBack4 application - Application generator + Application generator +
lb4 example + Download one of LoopBack example projects + Download examples
diff --git a/pages/en/lb4/Download-examples.md b/pages/en/lb4/Download-examples.md new file mode 100644 index 000000000..5f5bdaed4 --- /dev/null +++ b/pages/en/lb4/Download-examples.md @@ -0,0 +1,43 @@ +--- +lang: en +title: 'Download examples' +keywords: LoopBack 4.0, LoopBack 4 +tags: +sidebar: lb4_sidebar +permalink: /doc/en/lb4/Download-examples.html +summary: +--- + +### Synopsis + +Downloads a LoopBack example project from our GitHub monorepo. + + +```text +lb4 example [options] [] +``` + +### Options + +{% include_relative includes/CLI-std-options.md %} + +### Arguments + +`example-name` - Optional name of the example to clone. If provided, the tool +will skip the example-name prompt and run in a non-interactive mode. + +See [Examples and tutorials](Examples-and-tutorials.html) for the list of +available examples. + +### Interactive Prompts + +The tool will prompt you for: + +- Name of the example to download. If the name had been supplied from the +command-line, the prmpt is skipped. + +### Output + +The example project is download to a new directory. For example, when +downloading `getting-started` example, the tool stores the files in +`loopback4-example-getting-started`. From 5faed06ee198745f58ee506b8ef5b72f3b324bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 9 Feb 2018 08:47:12 +0100 Subject: [PATCH 2/2] fixup! address code review comments --- pages/en/lb4/Download-examples.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/en/lb4/Download-examples.md b/pages/en/lb4/Download-examples.md index 5f5bdaed4..7319b44f5 100644 --- a/pages/en/lb4/Download-examples.md +++ b/pages/en/lb4/Download-examples.md @@ -10,7 +10,8 @@ summary: ### Synopsis -Downloads a LoopBack example project from our GitHub monorepo. +Downloads a LoopBack example project from our +[GitHub monorepo](https://github.com/strongloop/loopback-next). ```text @@ -34,10 +35,10 @@ available examples. The tool will prompt you for: - Name of the example to download. If the name had been supplied from the -command-line, the prmpt is skipped. +command-line, the prompt is skipped. ### Output -The example project is download to a new directory. For example, when -downloading `getting-started` example, the tool stores the files in -`loopback4-example-getting-started`. +The example project is downloaded to a new directory. For example, when +downloading `getting-started` example, the tool stores the files +under the newly created `loopback4-example-getting-started` directory.