({ as: name, from: path, name: importName, sideEffects }: ComponentInfo, ctx: Context)
| 101 | } |
| 102 | |
| 103 | export function stringifyComponentImport({ as: name, from: path, name: importName, sideEffects }: ComponentInfo, ctx: Context) { |
| 104 | path = getTransformedPath(path, ctx.options.importPathTransform) |
| 105 | |
| 106 | const imports = [ |
| 107 | stringifyImport({ as: name, from: path, name: importName }), |
| 108 | ] |
| 109 | |
| 110 | if (sideEffects) |
| 111 | toArray(sideEffects).forEach(i => imports.push(stringifyImport(i))) |
| 112 | |
| 113 | return imports.join(';') |
| 114 | } |
| 115 | |
| 116 | export function getNameFromFilePath(filePath: string, options: ResolvedOptions): string { |
| 117 | const { resolvedDirs, directoryAsNamespace, globalNamespaces, collapseSamePrefixes, root } = options |
no test coverage detected
searching dependent graphs…