fix(nx-plugin): generate example file with .template extension (#16543)

This commit is contained in:
Craigory Coppola 2023-04-25 14:07:57 -04:00 committed by GitHub
parent b409095475
commit 5b0527bc45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 5 deletions

View File

@ -59,7 +59,7 @@ function normalizeOptions(host: Tree, options: Schema): NormalizedSchema {
}
function addFiles(host: Tree, options: NormalizedSchema) {
const indexPath = `${options.projectSourceRoot}/generators/${options.fileName}/files/src/index.ts__template__`;
const indexPath = `${options.projectSourceRoot}/generators/${options.fileName}/files/src/index.ts.template`;
if (!host.exists(indexPath)) {
host.write(indexPath, 'const variable = "<%= name %>";');
@ -69,10 +69,7 @@ function addFiles(host: Tree, options: NormalizedSchema) {
host,
path.join(__dirname, './files/generator'),
`${options.projectSourceRoot}/generators`,
{
...options,
tmpl: '',
}
options
);
if (options.unitTestRunner === 'none') {