Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
feat: use default nets path for resolveNets
Browse files Browse the repository at this point in the history
  • Loading branch information
kratico committed May 15, 2023
1 parent 7e4ccc6 commit 582545b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/resolveNets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { NetSpec } from "../nets/mod.ts"

const $nets = $.record($.instance(NetSpec as new() => NetSpec, $.tuple(), () => []))

export async function resolveNets(netsPathRaw?: string): Promise<Record<string, NetSpec>> {
const netsPath = path.resolve(netsPathRaw ?? "./nets.ts")
export async function resolveNets(netsPathRaw = "./nets.ts"): Promise<Record<string, NetSpec>> {
const netsPath = path.resolve(netsPathRaw)
await Deno.stat(netsPath)
const nets = await import(path.toFileUrl(netsPath).toString())
$.assert($nets, nets)
Expand Down

0 comments on commit 582545b

Please sign in to comment.