Loopback-next: Description of Options -- loopbackBuild / mocha

Created on 1 May 2018  Â·  10Comments  Â·  Source: strongloop/loopback-next

Description / Steps to reproduce / Feature proposal

From #1206

What is loopbackBuild?

Related Note:

No description in the CLI tool.


What is Enable mocha

Related Note:

Asked if this means that it will generate the tests for the project for him.

Acceptance Criteria

  • [ ] Add a description to the Todo tutorial explaining what CLI options we are asking them to select mean such as loopbackBuild / mocha
  • [ ] A good / easy to understand description of options in CLI tool when prompted to select them

    • loopbackBuild sets up typescript compiler with other features such as (copy non-ts files to dist)

    • mocha -- installs mocha as a dependency (not auto-generate tests)

  • [ ] Create an issue based on the discrepency between the CLI tooling and the documentation for it (if any)

Discussion Point

  • Should we keep loopbackBuild as an option or just remove the option entirely? ... lb-tsc provides copying of non-ts files which is essential for @loopback/boot's declarative support!

    • we have decided on __keeping the option__

_See Reporting Issues for more tips on writing good issues_

CLI developer-experience good first issue

Most helpful comment

I am of the opinion that less options are better, especially for novice-to-intermediate users, and that our CLI should be tailored for the majority of our users base that is happy to follow our recommended setup.

As for advanced users that understand reasoning behind our recommended setup and ramifications of disabling things like loopbackBuild and tslint, if they understand so much about the tooling, then surely they are able to tweak project infrastructure manually, without our CLI tooling. In fact, I'd expect that once our users outgrow the default infrastructure scaffolded by our CLI, they will need custom configuration that's different from the current options offered by CLI anyways.

I would like to see only one option offered by our CLI tooling:

  • _Do you want to use JavaScript or TypeScript?_

Everything else should be driven by the answer to this single question.

  • JavaScript: enable eslint, prettier, mocha.
  • TypeScript: enable tslint, prettier, mocha, loopbackBuild

Decision fatigue is a real problem, see e.g. Wikipedia or this article:

The neuromarketing takeaway from choice fatigue research is that forcing a consumer to make a series of decisions will tire them out (even though they won’t be conscious of that fatigue). As the decision-making continues, they will be increasingly reluctant to decide at all, or will choose the most simple choice – often a “no” or “do nothing.”

Isn't the relative lack of decision/choices one of the reason why people love Apple products so much?


_ADDED on 2018-05-16:_

See https://github.com/strongloop/loopback-next/issues/1309#issuecomment-387723199, https://github.com/strongloop/loopback-next/issues/1309#issuecomment-387965070 and https://github.com/strongloop/loopback-next/issues/1309#issuecomment-388027385 for a follow-up discussion that concluded with a different proposal - allow the user to choose "express" or "custom" route.

All 10 comments

  1. +1 to make the options more descriptive.
  2. -1 to remove the possibility to opt in build scripts from @loopback/build.
  3. We need to find a way to make it easy to understand the prompts.

Besides making the prompt more descriptive, perhaps add in more details in the docs as well? http://loopback.io/doc/en/lb4/Application-generator.html

I am of the opinion that less options are better, especially for novice-to-intermediate users, and that our CLI should be tailored for the majority of our users base that is happy to follow our recommended setup.

As for advanced users that understand reasoning behind our recommended setup and ramifications of disabling things like loopbackBuild and tslint, if they understand so much about the tooling, then surely they are able to tweak project infrastructure manually, without our CLI tooling. In fact, I'd expect that once our users outgrow the default infrastructure scaffolded by our CLI, they will need custom configuration that's different from the current options offered by CLI anyways.

I would like to see only one option offered by our CLI tooling:

  • _Do you want to use JavaScript or TypeScript?_

Everything else should be driven by the answer to this single question.

  • JavaScript: enable eslint, prettier, mocha.
  • TypeScript: enable tslint, prettier, mocha, loopbackBuild

Decision fatigue is a real problem, see e.g. Wikipedia or this article:

The neuromarketing takeaway from choice fatigue research is that forcing a consumer to make a series of decisions will tire them out (even though they won’t be conscious of that fatigue). As the decision-making continues, they will be increasingly reluctant to decide at all, or will choose the most simple choice – often a “no” or “do nothing.”

Isn't the relative lack of decision/choices one of the reason why people love Apple products so much?


_ADDED on 2018-05-16:_

See https://github.com/strongloop/loopback-next/issues/1309#issuecomment-387723199, https://github.com/strongloop/loopback-next/issues/1309#issuecomment-387965070 and https://github.com/strongloop/loopback-next/issues/1309#issuecomment-388027385 for a follow-up discussion that concluded with a different proposal - allow the user to choose "express" or "custom" route.

@virkt25 Is this task good for estimation based on the current acceptance criteria?

Updated based on the results of #1309

Based on the acceptance criteria, we have decided on splitting the issue into three: one for updating the prompt's description, one for providing express mode, and one for scripting capability of 'express' way of using the CLI tooling.

related to #1340

Adding to Taranveer's descriptions for mocha and loopbackBuild, here's a proposal for the descriptions of options:

â—‰ Enable tslint - adds a linter with pre-configured lint rules
â—‰ Enable prettier - installs prettier for consistent code formatting
â—‰ Enable mocha - installs mocha as a dependency
◉ Enable loopbackBuild - sets up typescript compiler with other features 
â—‰ Enable vscode - adds VSCode config files
◉ Enable repositories - includes a RepositoryMixin class in the app’s constructor
◉ Enable services - includes a ServiceMixin class in the app’s constructor

I tried to keep it short, but thoughts?

LGTM. one minor comment to change typescript to TypeScript.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dericgw picture dericgw  Â·  3Comments

shadyanwar picture shadyanwar  Â·  3Comments

ThePinger picture ThePinger  Â·  3Comments

shahulhameedp picture shahulhameedp  Â·  3Comments

rexliu0715 picture rexliu0715  Â·  3Comments