{Placeholder}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createApp } from "vue"; | |
| import { createEventHook, useEventBus } from "@vueuse/core"; | |
| import { CSS_KEY } from "./const"; | |
| import {MfeWidget} from "./mfe-widget"; | |
| export const mount = (element: Element) => { | |
| var app = createApp(MfeWidget); | |
| if (!element) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Stub out the component with this | |
| */ | |
| export const StubFieldComponent = { | |
| props: ["name"], | |
| setup: (props: { name: string }): unknown => { | |
| if (props.name === undefined) { | |
| throw new Error("did not recv props!"); | |
| } | |
| const field = useField<unknown>(props.name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| // Check if a Markdown file is provided as a command-line argument | |
| const filePath = process.argv[2]; | |
| if (!filePath) { | |
| console.error('Please provide a Markdown file as a command-line argument.'); | |
| process.exit(1); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ConnectError } from '@bufbuild/connect-web'; | |
| import { Ref, ref } from 'vue'; | |
| const useStreamingCall = <T>(controllerFn: StreamingCallController<T>) => { | |
| const currentData = ref<T | undefined>(); // todo: optionally not make undefined | |
| const cancel = controllerFn( | |
| (data: T) => { | |
| currentData.value = data; | |
| // do something with data |
https://www.youtube.com/watch?v=OIpfWTThrK8
It is good but could use some clarification and revision 5 years later...
Reasons to test:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup lang="ts"> | |
| import { useCeVueApp } from './useCeVueApp'; | |
| import PrimeVue from 'primevue/config' | |
| useCeVueApp(app => { | |
| app.use(PrimeVue); | |
| }); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fs from 'fs'; | |
| import path from 'path'; | |
| import * as acorn from 'acorn'; | |
| import * as walk from 'acorn-walk'; | |
| const getRelativeModuleFilePath = ( | |
| moduleFilePath: string, | |
| adjacentModulePath: string | |
| ): string | false => { | |
| const adjacentModuleFilePath = path.join(path.dirname(moduleFilePath), adjacentModulePath); |
NewerOlder