UNPKG

@graphprotocol/toolshed

Version:

A collection of tools and utilities for the Graph Protocol Typescript components

15 lines (12 loc) 478 B
import { existsSync } from 'fs' import { globSync } from 'glob' import { join } from 'path' export function loadTasks(rootPath: string) { const tasksPath = join(rootPath, 'tasks') const files: string[] = globSync('**/*.ts', { cwd: tasksPath, absolute: true }) files.forEach(require) } // This is going to fail if the project is using a different build directory export function isProjectBuilt(rootPath: string) { return existsSync(join(rootPath, 'build/contracts')) }