Skip to content

Commit

Permalink
fix: remove projen dependency on the schema component
Browse files Browse the repository at this point in the history
  • Loading branch information
alexforsyth committed Jun 25, 2024
1 parent 056d686 commit 88b51f5
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@ export type OptionsSchemaDefinition<
/**
* This component can be used to define a schema with a given identifier.
*/
export class OptionsSchema<T extends OptionsSchemaType> extends Component {
constructor(protected readonly blueprint: Blueprint, protected readonly identifier: string, protected readonly schema: T) {
super(blueprint);
}
export class OptionsSchema<T extends OptionsSchemaType> {
constructor(protected readonly blueprint: Blueprint, protected readonly identifier: string, protected readonly schema: T) {}

synthesize(): void {
if (!fs.existsSync(this.blueprint.context.wizardOptionsPath)) {
fs.mkdirSync(this.blueprint.context.wizardOptionsPath);
}

fs.writeFileSync(path.join(this.blueprint.context.wizardOptionsPath, this.identifier), JSON.stringify(this.schema));
}
}

0 comments on commit 88b51f5

Please sign in to comment.