Skip to content

Black Friday

Annual Pro is $90 for the first year, normally $120. Or start monthly at $6 for two months, then $12.

Ends Dec 4, 11:59 PM PT.

Create an account
← Public packages

@kentcdodds/starsnake

Starsnake: steer a snake-like ship Asteroids style, grow a crystal tail, and spend crystals on towers to defend your core. Mobile friendly.

FollowForkOpen app

Files

dump-html.mjs

6 lines · 390 B · JavaScript
// Writes dist/index.html (the page as served at the root of a host) for local file:// tests and art capture.
import { mkdirSync, writeFileSync } from 'node:fs'
import { renderPage } from '../app/page.ts'
mkdirSync('dist', { recursive: true })
writeFileSync('dist/index.html', renderPage({ origin: 'http://localhost', appBase: '', assetBase: '/a' }))
console.log('dist/index.html written')