Skip to content

Latest commit

 

History

History
 
 

packages

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Freshmint TypeScript Packages

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.

Development Tools

  • 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.

Setup

After cloning this repository, install its dependencies from the root of this repository:

npm install

Building for Development

This will launch tsup in watch mode and build all packages any time their files change:

npm run dev

Building for Production

Run this command to create a production build of all packages:

npm run build

Tests

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

Formatting & Linting

# Format all packages using Prettier
npm run format 

# Lint all packages using ESLint
npm run lint

Versioning & Releases

All Freshmint packages are published to NPM.

TODO: add documentation for versioning and release process