UNPKG

ember-codemod-pod-to-octane

Version:
19 lines (18 loc) 626 B
import { findFiles } from '@codemod-utils/files'; import { renamePodPath } from '../../../../../utils/files/index.js'; export function mapComponentStylesheets(options) { const { projectRoot } = options; const podDir = 'addon/components'; const filePaths = findFiles(`${podDir}/**/styles.{css,scss}`, { projectRoot, }); return filePaths.map((oldFilePath) => { const newFilePath = renamePodPath(oldFilePath, { podDir, replace: (key) => { return `addon/components/${key}`; }, }); return [oldFilePath, newFilePath]; }); }