Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const title = `${strings.capitalize(options.type)} ` +
`${strings.capitalize(options.entityName)}`;
const componentHtml =
` <h2>${title}</h2>\n` +
` <${componentComponentSelector}>\n`;
const container = root.querySelector('div.container');
if (!container) {
console.log('Could not find div with class container, ' +
`skipping update to ${filePath}`);
return tree;
}
container.appendChild(new TextNode(componentHtml));
tree.overwrite(filePath, root.toString());
return tree;
};
}