This repository contains several TypeScript packages:
freshmint
is the main offering; a CLI tool for creating and managing NFT apps.@freshmint/core
is a library containing the contract templates and core logic that powers the Freshmint CLI.@freshmint/react
is a library that provides React hooks to make it easier to interact with Freshmint contracts from React.@freshmint/cadence-loader
is a Webpack loader for importing Cadence files into a web app.
- The TypeScript packages are organized in a monorepo layout managed by the Turborepo build system.
- We use tsup (and, by extension, esbuild) to bundle each TypeScript package as a JavaScript library.
- We use Prettier for code formatting and ESLint for linting.
- We use changesets to manage versioning and changelogs.
- We use GitHub Actions to run tests on PR.
After cloning this repository, install its dependencies from the root of this repository:
npm install
This will launch tsup
in watch mode and build all packages any time their files change:
npm run dev
Run this command to create a production build of all packages:
npm run build
Run tests for all packages at once (note: currently core
is the only package that defines tests):
npm run tests
Run the tests for a specific package:
# Option 1: run the tests from the package directory
cd packages/core
npm run test
# Option 2: use the workspace flag
npm run test --workspace packages/core
# Format all packages using Prettier
npm run format
# Lint all packages using ESLint
npm run lint
All Freshmint packages are published to NPM.
TODO: add documentation for versioning and release process