INNER CODE UNIT · TypeScript

yamlDump

org-formation/org-formation-cli · src/yaml-cfn/index.ts:141

export const yamlDump = (input: any): string => {
  return yaml.dump(input, { schema: cfnSchema });
};

export const nunjucksRender = (input: string, filename: string, templatingContext: any): string => {
  const rendered = env.renderString(input, templatingContext);
  if (NunjucksDebugSettings.debug) {
    debugWriteNunjucksTemplate(filename, input, templatingContext, rendered);
  }
  return rendered;
};


export const debugWriteNunjucksTemplate = (filename: string, input: string, templatingContext: any, output: string): void => {
  try {
    const outputPath = path.resolve(NunjucksDebugSettings.path, path.basename(filename));
    mkdirSync(outputPath, { recursive: true });
    writeFileSync(path.join(outputPath, 'input.txt'), input);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…