oficina / memoria Public

Clone
git clone https://amadan.net/oficina/memoria

Plain git — no account needed to clone.

Download

Download this file

1// Emits rastrillo's vendored front-end assets into internal/memoria/static:
2// tokens.css, the one memoria uses. `go tool rastrillo doctor --fix` does
3// the same and more — it also adds select.js, datetime.js and calendar.js,
4// which no page links, and overwrites rastrillo.js with the old shim; this
5// writes only what the pin test reads.
6//
7// Not rastrillo.js: that file comes from estilo's busy package, via
8// scripts/writeestilo, without the old busy rule. The one in this library
9// still has it, and the two rules together cancel every submit.
10package main
11
12import (
13 "log"
14 "os"
15 "path/filepath"
16
17 "amadan.net/rastrillo/rastrillo/ui"
18)
19
20func main() {
21 dir := filepath.Join("internal", "memoria", "static")
22 for name, body := range map[string][]byte{
23 "tokens.css": ui.TokensCSS(),
24 } {
25 if err := os.WriteFile(filepath.Join(dir, name), body, 0o644); err != nil {
26 log.Fatalf("write %s: %v", name, err)
27 }
28 log.Printf("wrote %s (%d bytes)", name, len(body))
29 }
30}
31