mono-runner
Version:
A script runner for mono repos that just works. Use Mono to run separate compilers and dev servers for your packages at once, build only dependent packages or format everything at once.
23 lines (20 loc) • 634 B
text/typescript
export type PackageConfig = {
outPath?: null | string,
srcPath?: null | string,
readyIPC?: boolean
};
export type PackageInfo = {
name: string,
path: string,
dependencies: string[]
}
export type MaybePromise<T> = T | Promise<T>;
export type ReadFile = (path: string) => Promise<string|null>;
export type LoadModule = (path: string) => Promise<any|null>;
export type ResolverUtils = {
readFile: ReadFile,
loadModule: LoadModule,
loadBundled: LoadModule,
loadDependency: (dependency: string) => Promise<any|null>
};
export type PackageResolver = (pcg: PackageInfo, utils: ResolverUtils) => MaybePromise<PackageConfig|null>;