diff --git a/packages/contentful--create-contentful-app/src/includeFunction.ts b/packages/contentful--create-contentful-app/src/includeFunction.ts index 07b5ed789..59338b10a 100644 --- a/packages/contentful--create-contentful-app/src/includeFunction.ts +++ b/packages/contentful--create-contentful-app/src/includeFunction.ts @@ -16,12 +16,10 @@ const VALID_FUNCTION_TEMPLATES_DIRS = [ 'appevent-handler', 'appevent-transformation', 'external-references', - 'templates', ]; function functionTemplateFromName(functionName: string) { let dirName = functionName; - if (functionName === 'external-references') dirName = 'templates'; // backwards compatible for the apps repo examples folder for delivery functions (external-references) if (!VALID_FUNCTION_TEMPLATES_DIRS.includes(dirName)) { console.error( `Invalid function template: ${functionName}. Must be one of ${VALID_FUNCTION_TEMPLATES_DIRS.join( @@ -30,6 +28,7 @@ function functionTemplateFromName(functionName: string) { ); process.exit(1); } + if (functionName === 'external-references') dirName = 'templates'; // backwards compatible for the apps repo examples folder for delivery functions (external-references) return dirName; }