| 1234567891011 |
- import { readFileSync } from "node:fs"
- import { parse, compileScript, compileTemplate } from "@vue/compiler-sfc"
- const path = "src/modules/cockpit/CockpitShell.vue"
- const source = readFileSync(path, "utf8")
- const { descriptor } = parse(source, { filename: path })
- const script = compileScript(descriptor, { id: "t67", genDefaultAs: "__sfc__" })
- const template = compileTemplate({ source: descriptor.template.content, filename: path, id: "t67", ssr: true, compilerOptions: { bindingMetadata: script.bindings } })
- console.log("template errors:", JSON.stringify(template.errors))
- console.log("has data-pipe-district-note in compiled:", template.code.includes("data-pipe-district-note"))
- console.log("binds PIPE_DISTRICT_NOTE:", template.code.includes("PIPE_DISTRICT_NOTE"))
- console.log("has data-panel-note count:", (source.match(/data-pipe-district-note/g) || []).length)
|