Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
Signed-off-by: Francis <colifran@amazon.com>
  • Loading branch information
colifran committed Dec 11, 2023
1 parent 187c7df commit f857264
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class CdkCustomResourceModule extends Module {
/**
* Render module with components into an output file.
*/
public render(file: string) {
public renderTo(file: string) {
fs.outputFileSync(file, this.renderer.render(this));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function main() {
}

if (module.hasComponents) {
module.render(`dist/${fqn}.generated.ts`);
module.renderTo(`dist/${fqn}.generated.ts`);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('framework', () => {
module.build(component, path.dirname(outfile).split('/').pop() ?? 'dist');

// WHEN
module.render(`${tmpDir}/result.ts`);
module.renderTo(`${tmpDir}/result.ts`);

// THEN
const result = fs.readFileSync(path.resolve(tmpDir, 'result.ts'), 'utf-8');
Expand All @@ -48,7 +48,7 @@ describe('framework', () => {
module.build(component, path.dirname(outfile).split('/').pop() ?? 'dist');

// WHEN
module.render(`${tmpDir}/result.ts`);
module.renderTo(`${tmpDir}/result.ts`);

// THEN
const result = fs.readFileSync(path.resolve(tmpDir, 'result.ts'), 'utf-8');
Expand All @@ -68,7 +68,7 @@ describe('framework', () => {
module.build(component, path.dirname(outfile).split('/').pop() ?? 'dist');

// WHEN
module.render(`${tmpDir}/result.ts`);
module.renderTo(`${tmpDir}/result.ts`);

// THEN
const result = fs.readFileSync(path.resolve(tmpDir, 'result.ts'), 'utf-8');
Expand All @@ -88,7 +88,7 @@ describe('framework', () => {
module.build(component, path.dirname(outfile).split('/').pop() ?? 'dist');

// WHEN
module.render(`${tmpDir}/result.ts`);
module.renderTo(`${tmpDir}/result.ts`);

// THEN
const result = fs.readFileSync(path.resolve(tmpDir, 'result.ts'), 'utf-8');
Expand Down

0 comments on commit f857264

Please sign in to comment.