UNPKG

ember-codemod-add-component-signatures

Version:
12 lines (11 loc) 423 B
import { join } from 'node:path'; export function getTemplatePath(componentName, extensions, options) { const { componentStructure, src } = options; const filePath = componentStructure === 'nested' ? join(src, componentName, 'index') : join(src, componentName); if (!extensions.has('.hbs')) { throw new RangeError('extensions must include `.hbs`'); } return `${filePath}.hbs`; }