From 06128a6a4d4d6491e94ea3a626ee9255ec76073f Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 18 Jun 2016 07:43:26 -0700 Subject: [PATCH] bump version to 1.1; make `history` available --- info.rkt | 2 +- pollen/private/manual-history.rkt | 65 ++++++++++++++++++++++++ pollen/private/ts.rktd | 2 +- pollen/private/version.rkt | 2 +- pollen/scribblings/mb-tools.rkt | 4 +- pollen/scribblings/setup.scrbl | 10 ++-- pollen/scribblings/version-history.scrbl | 12 +++++ 7 files changed, 87 insertions(+), 10 deletions(-) create mode 100644 pollen/private/manual-history.rkt diff --git a/info.rkt b/info.rkt index 95b27f6..d92ec33 100644 --- a/info.rkt +++ b/info.rkt @@ -1,7 +1,7 @@ #lang info (define collection 'multi) -(define version "1.0") +(define version "1.1") (define deps '("base" ["txexpr" #:version "0.2"] ["sugar" #:version "0.2"] ["markdown" #:version "0.18"] "htdp" "at-exp-lib" "html-lib" "rackjure" "web-server-lib" "scribble-text-lib" "rackunit-lib" "gui-lib")) diff --git a/pollen/private/manual-history.rkt b/pollen/private/manual-history.rkt new file mode 100644 index 0000000..67c5467 --- /dev/null +++ b/pollen/private/manual-history.rkt @@ -0,0 +1,65 @@ +#lang racket/base +(require (for-syntax racket/base + syntax/parse) + version/utils + scribble/base + scribble/core + scribble/private/manual-sprop + scribble/private/manual-ex + scribble/private/manual-style) + +#| +Need this to make pollen docs buildable on v6.0. +`history` not added to scribble/manul till v6.1. +|# + +(provide pollen-history) + +(struct history-entry (what vers vers-stx expl)) + +(begin-for-syntax + (define-splicing-syntax-class clause + #:attributes (e) + [pattern (~seq #:added vers) + #:attr e #'(history-entry "Added" vers (quote-syntax vers) '("."))] + [pattern (~seq #:changed vers content) + #:attr e #'(history-entry "Changed" vers (quote-syntax vers) + (list ": " content))])) + +(define-syntax (pollen-history stx) + (syntax-parse stx + [(_ c:clause ...) + #'(make-history (list c.e ...))])) + +(define (make-history es) + (for ([e (in-list es)]) + (define vers (history-entry-vers e)) + (unless (valid-version? vers) + (raise-syntax-error 'history + (format "not a valid version: ~e" + vers) + (history-entry-vers-stx e)))) + (delayed-block + (lambda (renderer p ri) + (define pkg + (let ([from (resolve-get/tentative p ri '(exporting-packages #f))]) + (and from + (pair? from) + (car from)))) + (para + #:style (style "SHistory" (list scheme-properties)) + (for/list ([e (in-list (sort es (lambda (a b) (version . boolean?)]{Deprecated. Please use @racket[omitted-path?].} +@defoverridable[unpublished-path? (path? . -> . boolean?)]{@pollen-history[#:changed "1.1" @elem{Deprecated. Please use @racket[setup:omitted-path?].}]} -@defoverridable[omitted-path? (path? . -> . boolean?)]{Predicate that determines whether a path is omitted from @secref{raco_pollen_render} and @secref{raco_pollen_publish} operations. If the predicate evaluated to @racket[#t], then the path is omitted. The default predicate, therefore, is @racket[(lambda (path) #f)].} +@defoverridable[omitted-path? (path? . -> . boolean?)]{Predicate that determines whether a path is omitted from @secref{raco_pollen_render} and @secref{raco_pollen_publish} operations. If the predicate evaluated to @racket[#t], then the path is omitted. The default predicate, therefore, is @racket[(lambda (path) #f)]. @pollen-history[#:added "1.1"]} -@defoverridable[extra-published-path? (path? . -> . boolean?)]{Deprecated. Please use @racket[extra-path?].} +@defoverridable[extra-published-path? (path? . -> . boolean?)]{@pollen-history[#:changed "1.1" @elem{Deprecated. Please use @racket[setup:extra-path?].}]} -@defoverridable[extra-path? (path? . -> . boolean?)]{Predicate that determines if path is rendered & published, overriding @racket[(setup:omitted-path?)] above, and Pollen's default publish settings. For instance, Pollen automatically omits files with a @racket[.rkt] extension. If you wanted to force a @racket[.rkt] file to be published, you could include it here. Default is @racket[(lambda (path) #f)].} +@defoverridable[extra-path? (path? . -> . boolean?)]{Predicate that determines if path is rendered & published, overriding @racket[(setup:omitted-path?)] above, and Pollen's default publish settings. For instance, Pollen automatically omits files with a @racket[.rkt] extension. If you wanted to force a @racket[.rkt] file to be published, you could include it here. Default is @racket[(lambda (path) #f)]. @pollen-history[#:added "1.1"]} @defoverridable[splicing-tag symbol?]{Key used to signal that an X-expression should be spliced into its containing X-expression. Default is @val[default-splicing-tag].} diff --git a/pollen/scribblings/version-history.scrbl b/pollen/scribblings/version-history.scrbl index 825b725..3be2375 100644 --- a/pollen/scribblings/version-history.scrbl +++ b/pollen/scribblings/version-history.scrbl @@ -24,6 +24,18 @@ Beyond keeping the commit history available, I make no promise to maintain the p @section{Changelog} +@subsection{Version 1.1} + +@bold{New features} + +@seclink["raco-pollen" #:doc '(lib "pollen/scribblings/pollen.scrbl")]{@racketfont{raco pollen}}: Added @racket[--recursive] option to @secref["raco_pollen_render" #:doc '(lib "pollen/scribblings/pollen.scrbl")]. + +@racketmodname[pollen/setup]: @racket[setup:omitted-path?] replaces @racket[setup:unpublished-path?], and @racket[setup:extra-path?] replaces @racket[setup:extra-published-path?]. These settings are used during both render and publish operations. (The old names will still work, however.) + +Added @racket[setup:publish-directory], which can be used to set a default publish directory. + + + @subsection{Version 1.0} @bold{New features}