diff --git a/src/index.ts b/src/index.ts index fba8bfc..5c37fcf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,15 +1,20 @@ import type { ECSTaskDefinition } from "./interface"; import { writeFileSync } from "fs"; import getCallerFile from "get-caller-file"; + export const defineTaskDefinition = ( props: ECSTaskDefinition, distPath?: string, ) => { + console.log("defineTaskDefinition"); const callerFile = getCallerFile(); if (!callerFile) { throw new Error("Cannot find caller file"); } distPath = distPath ?? (callerFile.replace(".ts", ".json") as string); + console.log(`Writing to ${distPath}`); const json = JSON.stringify(props, null, 2); writeFileSync(distPath, json); }; + +export type { ECSTaskDefinition } from "./interface";