svallory / marko-vite-umd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marko Vite UMD Starter

Why?

Marko 5 is a great library for building web applications, but there are few examples about how to use it in client only environments. This starter is a demonstration. Potential use cases would be: Chrome Extension, Browser Extension, Electron App, Tauri App, etc.

Development (SRR)

Terminal: npm install && npm run dev

VsCode: Launch the Marko App (Launch) debug configuration or press F5.

Note: Set a breakpoint in any src/*.marko file to test the debugger.

Build (UMD)

Terminal: npm run build

Note: To prove it is an UMD. Open any website then the console and paste the dist/extension.js content. The Marko app should be rendered in the page. You may create a html element <div id="markoApp"></div> to specify the mount point.

TODO

  • remove server logic from build (umd) output
  • correctly match launch.json > serverReadyAction > pattern

About


Languages

Language:Marko 49.4%Language:TypeScript 42.4%Language:HTML 8.2%