0.5.0 • Published 1 year ago

freshmint v0.5.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Freshmint CLI

npm

freshmint is the main entrypoint for developers using Freshmint.

It is a CLI tool that provides commands to generate new NFT projects, deploy contracts, mint NFTs and manage live drops.

Development

To develop this package, start by installing all dependencies from the root of this repository:

npm install

Next, build all packages in watch mode:

This ensures that @freshmint/core is also up to date, which freshmint depends on.

# Keep this process running in your terminal!
npm run dev

Create a link to your development build

Use npm link to create a global symlink to the fresh command:

# Run this from the packages/freshmint directory
cd packages/freshmint

npm link

You can now execute the fresh command on your system:

# Start a new test project to use during development
fresh start test-project

Package Structure

  • index.ts - the main entrypoint for the fresh command.
  • commands - one file for each available CLI command. All new commands should go here.
  • mint - code for minting NFTs, parsing metadata and pinning assets to IPFS.
  • flow - a wrapper around the Flow CLI for executing Cadence transactions and scripts.
  • generate - code and templates for generating a Freshmint project.
  • devServer - a lightweight dev server that runs the Flow Emulator and FCL Dev Wallet.

Key Dependencies

  • @freshmint/core supplies:
    • All Cadence templates for contracts, transactions and scripts.
    • Logic for constructing metadata schemas, parsing and hashing metadata values.
  • commander is the framework for creating commands and parsing CLI arguments.