diff --git a/build/bundle.ts b/build/bundle.ts
index 9ebff09f..16b5afe6 100644
--- a/build/bundle.ts
+++ b/build/bundle.ts
@@ -208,6 +208,22 @@ async function bundleDeclarations() {
await execa("shx", ["rm", `${rootDir}/dist/index.js`])
}
+async function markoBuild() {
+ info("Copying Marko tag")
+ await execa("shx", ["mkdir", "-p", `${rootDir}/dist/tags`])
+ await execa("shx", [
+ "cp",
+ `${rootDir}/src/marko/auto-animate.marko`,
+ `${rootDir}/dist/tags/auto-animate.marko`,
+ ])
+ // The taglib manifest (marko.json) is a committed static file, copied to dist
+ // by addAssets() alongside README/LICENSE β see there. The tag's `../index`
+ // import is left extensionless on purpose: it is NOT compiled by rollup (the
+ // consumer's @marko/vite compiles it), and Vite resolves the extension to
+ // `index.mjs` in dist and to `index.ts` against source in a dev harness β so
+ // no `.mjs` fixup is needed here, unlike the JS-framework builds.
+}
+
async function addPackageJSON() {
info("Writing package.json")
const raw = await readFile(resolve(rootDir, "package.json"), "utf8")
@@ -222,13 +238,21 @@ async function addPackageJSON() {
}
async function addAssets() {
- info("Writing readme and license.")
+ info("Writing readme, license, and marko manifest.")
await execa("shx", [
"cp",
`${rootDir}/README.md`,
`${rootDir}/dist/README.md`,
])
await execa("shx", ["cp", `${rootDir}/LICENSE`, `${rootDir}/dist/LICENSE`])
+ // marko.json is a committed, static taglib manifest β copied verbatim like
+ // README/LICENSE, never generated. Its "exports" path is authored relative to
+ // the published package root (dist), so "./tags" resolves to dist/tags.
+ await execa("shx", [
+ "cp",
+ `${rootDir}/marko.json`,
+ `${rootDir}/dist/marko.json`,
+ ])
}
async function prepareForPublishing() {
@@ -291,6 +315,7 @@ async function main() {
if (!process.env.NO_NUXT) {
await nuxtBuild()
}
+ await markoBuild()
await addPackageJSON()
await addAssets()
await outputSize()
diff --git a/docs/src/components/CodeExample.vue b/docs/src/components/CodeExample.vue
index fae80f28..2295cb5f 100644
--- a/docs/src/components/CodeExample.vue
+++ b/docs/src/components/CodeExample.vue
@@ -11,6 +11,7 @@ import IconPNPM from "./IconPNPM.vue"
import IconJavaScript from "./IconJavaScript.vue"
import IconSvelte from "./IconSvelte.vue"
import IconAngular from "./IconAngular.vue"
+import IconMarko from "./IconMarko.vue"
import IconNuxt from "./IconNuxt.vue"
import IconBun from "./IconBun.vue"
import { computed, ref } from "vue"
@@ -25,6 +26,7 @@ type LanguageOption =
| "solid"
| "svelte"
| "angular"
+ | "marko"
| "qwik"
| "js"
| "yarn"
@@ -34,7 +36,7 @@ type LanguageOption =
| "bun"
type Language = {
- ext: "jsx" | "vue" | "html"
+ ext: "jsx" | "vue" | "html" | "marko"
example: string
title?: string
language: string
@@ -154,6 +156,13 @@ function copyCode(value: string) {
>
Angular
+
+ Marko
+
+// Official multi-color Marko logomark. It uses internal id references (clipPath +
+//