0.0.14 • Published 5 months ago
@paintswap/sonic-airdrop-definitions v0.0.14
Sonic Airdrop Types & Constants (sonic-airdrop-definitions)
Sonic Airdrop types and constants available for
Javascript,
TypeScript, and AssemblyScript / WebAssembly.
The items in this library will allow you to interact with Sonic Airdrop via:
- Vanilla JS applications
- React, Angular, and other frontend frameworks
- NodeJS / Typescript back end services
- AssemblyScript / WebAssembly for use with The Graph Protocol's web3 indexing
Usage
If using a private repo, you may need to login first:
npm loginTo use Sonic Airdrop types and constants in your project, first import the dev dependency:
npm install -D @paintswap/sonic-airdrop-definitionsyarn add -D @paintswap/sonic-airdrop-definitionsOnce installed, the SonicAirdropConstants, SonicAirdropTypes, and NONE type will be exposed. You can then access the individual types from their parent.
import { SonicAirdropConstants, SonicAirdropTypes, NONE } from '@paintswap/sonic-airdrop-definitions'
const { Order, PriceLevel } = SonicAirdropTypesIt is also possible to import specific items directly.
import { Order, PriceLevel } from '@paintswap/sonic-airdrop-definitions/types'Development
Build
npm run buildyarn buildUse Locally
NPM
From library root:
npm linkFrom project root:
npm link @paintswap/sonic-airdrop-definitionsYarn
From library root:
yarn linkFrom project root:
yarn link @paintswap/sonic-airdrop-definitionsYalc
Install yalc
npm install -g yalc@latestyarn add -g yalc@latestFrom library root:
yalc publishFrom project root:
yalc add @paintswap/sonic-airdrop-definitionsUse newly published updates to local yalc repository.
yalc updateRevert to NPM Repository
yalc remove @paintswap/sonic-airdrop-definitions
yarn add @paintswap/sonic-airdrop-definitionsManual Publish to NPM (--access=public needed the first time)
npm publishyarn publishVia github CI
- Push any changes to github
- Create a new release version with
yarn version - It will tag and push to Github which will trigger the CI to publish to NPM