async function main()

in src/decdk.ts [6:25]


async function main() {
  const argv = await yargs
    .usage('$0 <filename>', 'Synthesize a CDK stack from a declarative JSON schema')
    .positional('filename', { type: 'string', required: true })
    .argv;


  const templateFile = argv.filename;
  if (!templateFile) {
    throw new Error('filename is missing');
  }

  const template = await readTemplate(templateFile);
  const stackName = stackNameFromFileName(templateFile);
  const typeSystem = await loadTypeSystem();

  const app = new cdk.App();
  new DeclarativeStack(app, stackName, { template, typeSystem });
  app.synth();
}