bascik-scripts
Installation
SKILL.md
Bascik Scripts
Bascik runs Node.js code inside special <script> tags. Each is a standard ESM module whose default export returns an HTML string that replaces the tag. Requires the bascik skill for project basics.
Pick the right tag
| Need | Tag | Runs |
|---|---|---|
| HTML that depends on the page or route (BASCIK_PAGE_PATH, BASCIK_PAGE_FILE, BASCIK_ROUTE) | data-bascik-build |
Build and dev, once per use (cached by inputs) |
| Identical HTML shared by every use of a component or every route | data-bascik-build-once |
Once per file (component registration or route template), cached |
Many pages from one [param].html template |
data-bascik-routes |
Build and dev startup |
| Markup that depends on the request (cookies, headers, query) | data-bascik-server |
Every request, before the response starts |
| A slow per-request block that should not delay the page shell | data-bascik-stream |
Every request, streamed in document order |
| A JSON or HTTP endpoint | src/api/<name>.ts exporting GET, POST, ... |
Every request |
Prefer build-time work. Server, stream, and API code needs bascik --server (or a serverless target such as Cloudflare); a plain static host cannot run it.