◊(Local Yarn Code "Check-in [d5b9dd58]")

Overview
Comment:Break loading cycle in pollen/setup
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d5b9dd58f41587ac0036fde31fe9e2c6329aae64d559210429a7b42392ae25e5
User & Date: joel on 2021-02-14 15:35:20
Other Links: manifest | tags
Context
2021-11-28
18:04
Create new branch named "evolve" check-in: 27ef80a0 user: joel tags: evolve
2021-02-14
15:35
Break loading cycle in pollen/setup Leaf check-in: d5b9dd58 user: joel tags: trunk
2020-05-11
02:01
Render home page from pollen/markup (Fixes [629a9c063beb5809]) check-in: 9998fecb user: joel tags: trunk
Changes

Modified pollen.rkt from [8f4969dd] to [92b6e46e].

1
2
3
4
5
6
7
8


9
10

11
12
13
14
15
16
17
18
19
20
21
22
23

24

25
26
27
28

29
30
31
32
33
34
35
1
2
3
4
5
6
7

8
9
10

11

12
13
14
15
16
17
18
19
20
21
22
23
24

25
26
27
28

29
30
31
32
33
34
35
36







-
+
+

-
+
-












+
-
+



-
+







#lang racket/base

; SPDX-License-Identifier: BlueOak-1.0.0
; This file is licensed under the Blue Oak Model License 1.0.0.

;; Functions for tags and template content used in all Pollen source files and templates.

(require (for-syntax racket/base
(require (for-syntax "targets.rkt"
                     racket/base
                     racket/syntax
                     syntax/parse
                     syntax/parse))
                     pollen/setup))

(require pollen/tag
         pollen/setup
         "cache.rkt"
         "tags-html.rkt"
         "snippets-html.rkt"
         "crystalize.rkt")

(provide (all-defined-out)
         (all-from-out "crystalize.rkt" "snippets-html.rkt" "cache.rkt"))

(module setup racket/base
  (require "targets.rkt"
  (require syntax/modresolve
           syntax/modresolve
           racket/runtime-path
           pollen/setup)
  (provide (all-defined-out))
  (define poly-targets '(html))
  (define poly-targets targets)
  (define allow-unbound-ids? #f)
  
  (define block-tags (append '(title style dt note) default-block-tags))

  (define-runtime-path tags-html.rkt     "tags-html.rkt")
  (define-runtime-path snippets-html.rkt "snippets-html.rkt")
  (define-runtime-path dust.rkt          "dust.rkt")
49
50
51
52
53
54
55
56

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
50
51
52
53
54
55
56

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79







-
+














-
+







;; current output format and the list of poly-targets in the setup module.
;; Use this macro when you know you will need keyword arguments.
;;
(define-syntax (poly-branch-kwargs-tag stx)
  (syntax-parse stx
    [(_ TAG:id)
     (with-syntax ([((POLY-TARGET POLY-FUNC) ...) 
                    (for/list ([target (in-list (setup:poly-targets))])
                    (for/list ([target (in-list targets)])
                              (list target (format-id stx "~a-~a" target #'TAG)))]
                   [DEFAULT-FUNC (format-id stx "html-~a" #'TAG)])
       #'(define-tag-function (TAG attributes elems)
           (case (current-poly-target)
             [(POLY-TARGET) (POLY-FUNC attributes elems)] ... 
             [else (DEFAULT-FUNC attributes elems)])))]))

;; Like above, but uses `define` instead of `define-tag-function`.
;; Use this when you know you will not need keyword arguments.
;;
(define-syntax (poly-branch-tag stx)
  (syntax-parse stx
    [(_ TAG:id)
     (with-syntax ([((POLY-TARGET POLY-FUNC) ...) 
                    (for/list ([target (in-list (setup:poly-targets))])
                    (for/list ([target (in-list targets)])
                              (list target (format-id stx "~a-~a" target #'TAG)))]
                   [DEFAULT-FUNC (format-id stx "html-~a" #'TAG)])
       #'(define (TAG . args)
           (case (current-poly-target)
             [(POLY-TARGET) (apply POLY-FUNC args)] ...
             [else (apply DEFAULT-FUNC args)])))]))

Added targets.rkt version [7459a9e7].






1
2
3
4
5
+
+
+
+
+
#lang racket/base

(provide targets)

(define targets '(html))