Unlisted
postpostscript
moduleHighlightValueLink
HTTP
moduleHighlightValueLink: Link to a Val With a Value or Method's Code Highlighted Examples: import { moduleHighlightValueLink, getRedirectUrl } from "https://esm.town/v/postpostscript/moduleHighlightValueLink";
console.log(await moduleHighlightValueLink("@std/email", "email"))
// https://val.town/v/std/email#L6-42
console.log(await moduleHighlightValueLink("@postpostscript/moduleHighlightValueLink", "moduleHighlightValueLink"))
// https://val.town/v/postpostscript/moduleHighlightValueLink#L6-20
// get URL you can imbed in an iframe
console.log(getRedirectUrl("@postpostscript/moduleHighlightValueLink", "getRedirectUrl", true));
// https://postpostscript-modulehighlightvaluelink.web.val.run/?embed=1&module=%40postpostscript%2FmoduleHighlightValueLink&name=getRedirectUrl Iframe example: import { htmlResponse } from "https://esm.town/v/postpostscript/html";
import { getRedirectUrl } from "https://esm.town/v/postpostscript/moduleHighlightValueLink";
export default async function(req: Request): Promise<Response> {
return htmlResponse`
<iframe src="${getRedirectUrl(import.meta.url, "default", true)}" width="100%" height="100%">
</iframe>
`;
}
2
postpostscript
vue
Script
vue: inline Vue SFC components in your HTML Example Val showing how to define reusable components: @postpostscript/vueExample import { htmlResponse } from "https://esm.town/v/postpostscript/html";
import { vueSfcInline } from "https://esm.town/v/postpostscript/vue";
export default function() {
return htmlResponse`
${vueSfcInline`
<script setup type="ts">
import { ref } from "vue";
const name = ref("Vue");
</script>
<template>
Hello World from {{ name }}!
<br>
<input v-model="name" />
</template>
`}
`;
}
0
postpostscript-generatejwksenv.web.val.run
Updated: March 6, 2024