Skip to content

Description of Options -- loopbackBuild / mocha #1298

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

Closed
3 tasks
virkt25 opened this issue May 1, 2018 · 10 comments
Closed
3 tasks

Description of Options -- loopbackBuild / mocha #1298

virkt25 opened this issue May 1, 2018 · 10 comments
Assignees
Labels
CLI developer-experience Issues affecting ease of use and overall experience of LB users good first issue

Comments

@virkt25
Copy link
Contributor

virkt25 commented May 1, 2018

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

@raymondfeng
Copy link
Contributor

  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.

@dhmlau
Copy link
Member

dhmlau commented May 2, 2018

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

@bajtos
Copy link
Member

bajtos commented May 2, 2018

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 #1309 (comment), #1309 (comment) and #1309 (comment) for a follow-up discussion that concluded with a different proposal - allow the user to choose "express" or "custom" route.

@shimks
Copy link
Contributor

shimks commented May 14, 2018

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

@virkt25
Copy link
Contributor Author

virkt25 commented May 15, 2018

Updated based on the results of #1309

@bajtos bajtos added developer-experience Issues affecting ease of use and overall experience of LB users CLI labels May 16, 2018
@shimks
Copy link
Contributor

shimks commented May 17, 2018

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.

@dhmlau
Copy link
Member

dhmlau commented Jun 25, 2018

related to #1340

@bajtos bajtos added the LB4 GA label Jul 31, 2018
@dhmlau dhmlau added p2 and removed non-DP3 labels Aug 23, 2018
@dhmlau dhmlau added post-GA and removed LB4 GA labels Sep 6, 2018
@dhmlau dhmlau removed the post-GA label Nov 2, 2018
@nabdelgadir
Copy link
Contributor

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?

@dhmlau
Copy link
Member

dhmlau commented Dec 20, 2018

LGTM. one minor comment to change typescript to TypeScript.

@nabdelgadir
Copy link
Contributor

Closing as done #2186.

@b-admike b-admike added this to the January 2019 milestone milestone Jan 14, 2019
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 good first issue
Projects
None yet
Development

No branches or pull requests

9 participants