Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wvbe/dirty_deno_slapper

A Deno module that slaps your TS/CSS source together
https://github.com/wvbe/dirty_deno_slapper

deno esbuild postcss xhtml

Last synced: 9 days ago
JSON representation

A Deno module that slaps your TS/CSS source together

Awesome Lists containing this project

README

        

A real quick-and-dirty build system for a simple XHTML/TS/CSS page, because I hate to write it twice.

> No guarantees to a stable API whatsoever

In your `slap.ts`:

```sh
await slap(
import.meta.resolve('./src/game/Game.ts'),
import.meta.resolve('./src/style.css'),
{
sourcemap: true,
},
);
console.log(xhtml);
```

Then in your `deno.json`:

```json
{

"tasks": {
"slap": "deno run -A slap.ts > slap.html",
"watch": "npx chokidar-cli \"src/**/*\" --command \"deno task slap\"",
"dev": "deno task slap && deno task watch"
}
}

```