Skip to content

TypeScript test and dApp utilities for the Flow blockchain.

Notifications You must be signed in to change notification settings

samatechtw/onflow-ts

Repository files navigation

@samatech/onflow-ts

TypeScript test and dApp utils for the Flow blockchain.


Installation

npm i -D @samatech/onflow-ts

Usage

Configuration

BASE_PATH

Required

Directory where the app's Cadence files are located

CDC_DIRECTORIES

Subdirectories containing Cadence contracts, transactions, and scripts.

Default

{
  'CONTRACT': './contracts/',
  'TRANSACTION': './transactions/',
  'SCRIPT': './scripts/',
}

Development

Install packages with PNPM

pnpm install

Build

# tsc
npm run build

Test

# Jest
npm run test

Lint

# ESlint
npm run lint

Format

# Use Prettier to format files
npm run format
# Just check the formatting (used in CI)
npm run format:check

Release

Currently, a custom release script is used to update the version and publish to NPM. This must be executed on the main branch, and <version> must not equal the current version on NPM.

node scripts/release.js <version>