An open API service indexing awesome lists of open source software.

https://github.com/eighty4/dank

Multi-page development system for CDN-deployed websites
https://github.com/eighty4/dank

Last synced: 18 days ago
JSON representation

Multi-page development system for CDN-deployed websites

Awesome Lists containing this project

README

          

# Build DANK webpages

### Get developing right away:

```shell
bun create dank --out-dir www

npm create dank -- --out-dir www

pnpm create dank --out-dir www
```

### DANK has some perks:

- Webpage-first development for multi-page websites
- TypeScript supported with ``
- Code splitting via `esbuild` bundler across all webpages
- Hashes added to all bundled assets for efficient cache utilization
- `dank serve` hot-reloads CSS in the browser
- `dank serve` launches dev services to streamline your workflow
- `dank preview` serves a production build for preview
- `dank build` minifies and tree-shakes with `esbuild`
- DANK's codebase is so tiny you can read it all in 20 minutes

### DANK isn't for every use case!

[Vite](https://vite.dev) is the right move for building a Single-Page Application.

Dynamic content with Static-Site Generation or Server-Side Rendering should use
[Astro](https://astro.build).

#### DANK is an ideal choice for multi-page websites deployed to a CDN that integrate with serverless components and APIs.

## `dank.config.ts` examples

Webpages and their URLs are configured explicitly to keep your URLs
and workspace organized independently:

```typescript
import { defineConfig } from '@eighty4/dank'

export default defineConfig({
pages: {
'/': './home.html',
},
})
```

Streamline development with `dank serve` launching APIs and databases when starting your website's dev server:

```typescript
import { defineConfig } from '@eighty4/dank'

export default defineConfig({
pages: {
'/': './home.html',
},
services: [
{
command: 'node --watch --env-file-if-exists=.env.dev server.ts',
cwd: './api',
},
],
})
```