(root: string, label: string)
| 62 | } |
| 63 | |
| 64 | function writeWidgetModule(root: string, label: string): void { |
| 65 | mkdirSync(root, { recursive: true }); |
| 66 | const widgetFile = join(root, "widget.mjs"); |
| 67 | writeFileSync( |
| 68 | widgetFile, |
| 69 | [`export function widgetLabel() { return ${JSON.stringify(label)}; }`, ""].join("\n"), |
| 70 | "utf8", |
| 71 | ); |
| 72 | } |
| 73 | |
| 74 | function writeBarePackageModule(workspaceRoot: string, label: string): void { |
| 75 | const packageDir = join(workspaceRoot, "node_modules", "@demo", "hsr-pkg"); |
no outgoing calls
no test coverage detected