Skip to content

Commit

Permalink
Add logger and post-install actions (#70)
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina authored Dec 7, 2023
1 parent cb8f32b commit f968e10
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const createApp = async (dir, { projectName, services, entrypoint, port,
}

const generator = new runtime.Generator({
logger,
projectName
})

Expand Down Expand Up @@ -122,10 +123,12 @@ export const createApp = async (dir, { projectName, services, entrypoint, port,
throw new Error(`Template ${templateName} does not have a Generator`)
}

const templateGenerator = new template.Generator()
const templateGenerator = new template.Generator({
logger
})

templateGenerator.setConfig({
...templateGenerator.config,
...templateGenerator.getDefaultConfig(),
serviceName,
plugin: true,
tests: true,
Expand Down Expand Up @@ -158,5 +161,7 @@ export const createApp = async (dir, { projectName, services, entrypoint, port,
})
await child

await generator.postInstallActions()

logger.info('App created!')
}

0 comments on commit f968e10

Please sign in to comment.