ni icon indicating copy to clipboard operation
ni copied to clipboard

Documentation request: how to install

Open zackdotcomputer opened this issue 1 year ago • 5 comments

Clear and concise description of the problem

If an amateur user comes across this project, the steps to get it running on their system are not clear

Suggested solution

The README should include a "getting started" section with the steps necessary to go from zero to functional on Windows, Mac, and at least one common Linux distro.

Alternative

Hopefully I didn't miss something that explains this already

Additional context

I'd be happy to PR this documentation in, but I am myself not exactly sure what your intended setup flow is for users.

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

zackdotcomputer avatar Jul 28 '22 09:07 zackdotcomputer

What steps you think are missing? I personally would like to keep the readme as minimal as possible, and I don't think we should teach how to install Node step by step in every single library (there are quite a lot of tutorials and Stackoverflow out there)

antfu avatar Jul 29 '22 11:07 antfu

@antfu I think it's fair to assume your end user arrives with node as well as whatever package managers they care about installed and leave that part unsaid. But you don't have any guidance on how to go from point A "you have Node, npm, yarn, etc. all installed" to point B "you can run ni and it is in your terminal's PATH". Indeed, you don't even list in the README what the package's name is on the various distribution repos.

I don't think it would bloat your README to provide the guidance that the user should run npm i -G @antfu/ni or yarn global add @antfu/ni or so on to get started, since opening the package.json to get the package name and then knowing how to turn that into a global command might honestly be beyond a lot of node newbies who would most benefit from this.

zackdotcomputer avatar Jul 29 '22 11:07 zackdotcomputer

you can run ni and it is in your terminal's PATH

that go beyond this tool. npm i -g should make it available without setup, or you are not installing Node properly (then it's go back to say if we should teach how to install Node, or any CLI tool frankly)

npm i -G @antfu/ni or yarn global add @antfu/ni

It's we provided this? It doesn't matter if you use npm or yarn to install the cli globally. Or rather that's the reason why this package is created - not to have every repo list how you install a package with every different package managers, nor you to check what you need to use.

image

Maybe I am biased, so instead of arguing, how about you share an example of how you would improve it, and then we can discuss how we can make it concise while informative.

antfu avatar Jul 29 '22 12:07 antfu

Ah that screenshot shows that this is a situation where my clause from the original Issue applies:

Hopefully I didn't miss something that explains this already

Now that I see that command hiding in there, I think the only thing I would change is to replace

npm i -g @antfu/ni

ni

with

Installation

npm i -g @antfu/ni

Usage

ni

zackdotcomputer avatar Jul 29 '22 13:07 zackdotcomputer

The main change, now that I see the install command in the README at all, is to just add that header to make it easier for dummies like myself who scan quickly through a README looking for the "what do I paste to start using this"

zackdotcomputer avatar Jul 29 '22 13:07 zackdotcomputer