onflow / freshmint

Apache License 2.0
68 stars 17 forks source link

Auto-install the Flow CLI #40

Open psiemens opened 2 years ago

psiemens commented 2 years ago

Freshmint currently requires the Flow CLI (flow binary) to be installed in order to deploy contracts or mint NFTs.

The Flow CLI is not installed alongside Freshmint but is mentioned as a dependency in the README. This is a weak connection.

Freshmint should do one of the following:

  1. Stop depending on the flow binary and implement transaction/script logic in JS
  2. Automatically install the flow binary on installation
psiemens commented 2 years ago

I'd like to go with option 2 because it allows Freshmint users to eject from Freshmint and use their project directly with the Flow CLI.

It's fairly easy to install platform-specific Go binaries in an NPM postinstall script: https://blog.xendit.engineer/how-we-repurposed-npm-to-publish-and-distribute-our-go-binaries-for-internal-cli-23981b80911b