fable-compiler/fable-compiler.github.io

dotnet tool install fable

goswinr opened this issue · 4 comments

Is there a reason why dotnet tool install fable is not mentioned in the docs?
Or did I not find it? e.g. on https://fable.io/docs/2-steps/setup.html ?
I only read about it here: https://fable.io/blog/Announcing-Nagareyama-4.html

95% of the documentation has been written when Fable was in version 2.

When releasing Fable 3 we probably forget the "obvious command for us".

I think we should add it to the Start a new project page. What do you think ?

Example:

  1. dotnet new --install Fable.Template
  2. dotnet tool install fable
  3. dotnet new fable

It's tricky because we can say there are two approaches: the "raw" one which would be something like:

dotnet tool install fable
dotnet fable src

And the template/sample clone approach. For the second approach there are several options in the next page in the docs. In these cases there's usually already a .config/dotnet-tools.json including Fable so you just need to do dotnet tool restore and this is often done in the build script of the template/sample (btw I just noticed the Fable.Template wasn't doing that so I pushed a new version to fix it). In fact, running dotnet tool install fable will throw an error like the following if there's a version mismatch:

Cannot add package. Manifest file already contains version 3.2.8 of the package fable. Uninstall/install or edit manifest file .config\dotnet-tools.json to specify the new version 3.2.9.

BTW, I wouldn't add the dotnet tool install fable in the Setup page, as these are system requirements and we recommend to install Fable locally (per project) not globally (per system).

Thanks for your quick replies.
For me a global installation is ok. But I am just a fable beginner. 🤷‍♂️ I thought there could be an alternative start from scratch to the start from template section. (that is downloading 6000 files from npm to run "Hello, World!" )
@MangelMaxime I was actually just trying to test this https://twitter.com/mangelmaxime/status/1415016383167991817

it's all good and there now