-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix build for optimized npm package, add example, improve tsconfig fo…
… d.ts files
- Loading branch information
Showing
4 changed files
with
23 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
node_modules | ||
/build | ||
build | ||
.env* | ||
.vscode | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import { disconnect, initialize, isConnected } from "./chain" | ||
|
||
const main = async () => { | ||
const api = await initialize() | ||
const chain = await api.rpc.system.chain() | ||
console.log(`Chain: ${chain} - Is connected: ${isConnected()}`) | ||
await disconnect() | ||
} | ||
main() | ||
// const main = async () => { | ||
// const api = await initialize() | ||
// const chain = await api.rpc.system.chain() | ||
// console.log(`Chain: ${chain} - Is connected: ${isConnected()}`) | ||
// await disconnect() | ||
// } | ||
// main() | ||
|
||
export * from './chain' | ||
export * from './spec' | ||
export * from '@polkadot/api' | ||
// Allows for generic imports (eg. import {...} from 'avail-js-sdk') | ||
export * from "./chain" | ||
export * from "./spec" | ||
|
||
export * as chain from './chain' | ||
export * as spec from './spec' | ||
// Allows for custom imports (eg. import {...} from 'avail-js-sdk/chain') | ||
export * as chain from "./chain" | ||
export * as spec from "./spec" | ||
|
||
// Re-exports to avoid duplicattion | ||
export * from "@polkadot/api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters