Skip to content

Commit

Permalink
chore(fastify): update default destinationPath
Browse files Browse the repository at this point in the history
  • Loading branch information
dipendraupreti committed Aug 29, 2024
1 parent 57373da commit f752dbd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions generators/fastify-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,14 @@ export default class FastifyPluginGenerator extends Generator {
}

if (!this.options.destinationPath) {
const defaultPath = this.props.installationType === "library"
? "./packages/fastify"
: this.props.installationType === "app"
? "./libs/fastify"
: `./${this.props.name}`;

const { destinationPath } = await this.prompt({
default: `${this.props.name}`,
default: defaultPath,
message: "Destination path",
name: "destinationPath",
type: "input",
Expand All @@ -129,7 +135,7 @@ export default class FastifyPluginGenerator extends Generator {
name: "description",
type: "input"
});

this.props["description"] = description;

this.props["displayName"] =
Expand Down

0 comments on commit f752dbd

Please sign in to comment.