UNPKG

ember-codemod-add-component-signatures

Version:
16 lines (15 loc) 538 B
import { join } from 'node:path'; export function getClassPath(componentName, extensions, options) { const { componentStructure, src } = options; const filePath = componentStructure === 'nested' ? join(src, componentName, 'index') : join(src, componentName); if (extensions.has('.gts')) { return `${filePath}.gts`; } if (extensions.has('.ts')) { return `${filePath}.ts`; } // hbs file only. The blueprint for template-only component is in `*.ts`. return `${filePath}.ts`; }