Inconsistent package manager install / add instructions
MikeMcC399 opened this issue · comments
Subject
Multiple pages using npm install
, pnpm add
and yarn add
Description
Issue
Instructions for installing cypress and other npm modules are shown inconsistently throughout the website for npm, pnpm and Yarn package managers.
-
Sometimes the short-form of an optional flag is used and sometimes the long-form is used, e.g.
npm install cypress -D
- Getting Started > Installing Cypress > npm install uses the equivalent
--save-dev
:
npm install cypress --save-dev
- Getting Started > Installing Cypress > npm install uses the equivalent
-
Sometimes an optional flag is positioned directly after
install
and sometimes the same optional flag is positioned at the end of line, e.g.Continuous Integration > Introduction > Setting up CI > Boot your server > Solutions uses
--save-dev
directly afterinstall
:npm install --save-dev start-server-and-test
Continuous Integration > Introduction > Setting up CI > Basics uses
--save-dev
at the end of line:npm install cypress --save-dev
Suggestions
Each of the examples are correct, however making the instructions consistent throughout the site avoids causing confusing about whether any differences are significant or not.
-
Suggest to standardize on long form for optional flags, e.g.
--save-dev
. This makes for better comprehension for readers unfamiliar with the meaning of the alternative short-form optional flag. -
Align the positioning of the optional flag to the package manager documentation. For instance, npm CLI >
npm-install
> Description shows--save-dev
used at the end of the line in its example:npm install node-tap --save-dev
Most of the examples use npm install
. A few examples use yarn add
and just one example uses pnpm add
.
If the suggestions I made are acceptable then I will submit a PR to implement them. Please let me know if this should be done and if the individual suggestions are OK.
@MikeMcC399 Yep, exactly the same recommendations I was going to suggest. Definitely want things easier to follow for people more unfamiliar with package managers.
Thanks for your feedback and agreement!
- #5765 is now submitted to propose this documentation improvement.