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

https://github.com/jaredreisinger/turehounds.com

The Ture Hounds website, now via 11ty.dev and hosted on Netlify!
https://github.com/jaredreisinger/turehounds.com

Last synced: 4 months ago
JSON representation

The Ture Hounds website, now via 11ty.dev and hosted on Netlify!

Awesome Lists containing this project

README

          

# Ture Hounds website

A static site, generated by [eleventy](https://11ty.dev), with some custom code and, with luck, streamlined Typescript support.

## A note about Typescript

Eleventy is fundamentally a pure-Javascript tool, and relies on CJS-style `require()` statements to do its job. _**I**_ would much rather deal with ESM-like Typescript code. There are [solutions](https://www.jameshill.dev/articles/typescript-and-11ty/) for ways to accomplish this, but I really want a 100% end-to-end Typescript solution.

To me, having a distinct transpile step is completely acceptable; we assume the entire [`./src/`](./src) tree is in Typescript, and transpile it into a temporary `./_js` directory, which in-turn is being used by Eleventy (and potentially watched) from which it generates `./_site`. The only catch is making sure that Eleventy gets the “properly commingled” files that it expects. Eleventy doesn’t really separate code, templates, and data; it expects them all to live within the source (now `./_js`) directory.

## `package.json` scripts

There are a lot of pieces to coordinate to get the site up and running: css, eleventy, search info (lunr), etc. To keep these steps rational, they are broken down by function (`css`, `eleventy`, `search`, `titles`), with `:`-suffixes for variants (`css: watch`, `eleventy: prod`), etc. There are roll-up scripts for common invocations that use `npm-run-all` to coordinate. Generally, these _**won’t**_ use `**`-style globbing, because order matters.

Truly, we need full Make-style dependencies (that de-duplicate steps), but we'll live with hand-rolled "just enough" scripts. (Perhaps something like `_`-prefixed scripts to indicate those that shouldn't be manually run?)