Lines Matching +refs:match +refs:base +refs:name +refs:latest

1 #lang racket/base
5 (require racket/match
11 setup/collection-name
14 (define (package-name? package)
15 (regexp-match-exact? #rx"[-_a-zA-Z0-9]*" package))
17 (define (pkg-new name)
24 (match (system-type)
32 (make-string (string-length name) #\=))
37 (define sanitized-name
38 (if (string->number name)
39 (string-append "|" name "|")
40 name))
43 (define (expand/display str [table (hash #"name" name #"user" user
45 #"sanitized-name"
46 sanitized-name)])
49 (let ([m (regexp-match #rx"<<([^>]*)>>" in 0 #f (current-output-port))])
56 [(directory-exists? name)
57 (pkg-error (format "cannot make package, folder exists~n path: ~a" name))]
58 [(not (package-name? name))
59 (pkg-error (format "cannot make package, invalid collection name~n name: ~a"
60 name))]
62 (make-directory name)
63 (parameterize ([current-directory name])
69 <<name>>
133 name: CI
136 name: "Build on Racket '${{ matrix.racket-version }}' (${{ matrix.racket-variant }})"
137 runs-on: ubuntu-latest
150 - name: Installing <<name>> and its dependencies
151 run: raco pkg install --no-docs --auto --name <<name>>
152 - name: Compiling <<name>> and building its docs
153 run: raco setup --check-pkg-deps --unused-pkg-deps <<name>>
154 - name: Testing <<name>>
155 run: raco test -x -p <<name>>
163 (define collection "<<name>>")
164 (define deps '("base"))
166 (define scribblings '(("scribblings/<<name>>.scrbl" ())))
178 <<name>>
188 #lang racket/base
197 ;; $ raco pkg install <<name>>
199 ;; $ raco pkg remove <<name>>
201 ;; $ raco docs <<name>>
235 [("-n" "--name") name "Who to say hello to" (set-box! who name)]
244 ;; scribblings/name.scrbl
245 (with-output-to-file (format "~a.scrbl" name)
248 @require[@for-label[<<sanitized-name>>
249 racket/base]]
251 @title{<<name>>}
254 @defmodule[<<sanitized-name>>]