|
|
|
@ -1,64 +1,60 @@
|
|
|
|
|
#lang racket/base
|
|
|
|
|
|
|
|
|
|
;; todo: how to make project- or user-specific prefs
|
|
|
|
|
(provide (prefix-out world: (all-defined-out)))
|
|
|
|
|
|
|
|
|
|
(provide (all-defined-out))
|
|
|
|
|
(define pollen-version "0.001")
|
|
|
|
|
|
|
|
|
|
(define POLLEN_VERSION "0.001")
|
|
|
|
|
(define preproc-source-ext 'p)
|
|
|
|
|
(define markup-source-ext 'pm)
|
|
|
|
|
(define null-source-ext 'px)
|
|
|
|
|
(define ptree-source-ext 'ptree)
|
|
|
|
|
|
|
|
|
|
(define PREPROC_SOURCE_EXT 'p)
|
|
|
|
|
(define MARKUP_SOURCE_EXT 'pm)
|
|
|
|
|
(define NULL_SOURCE_EXT 'px)
|
|
|
|
|
(define PTREE_SOURCE_EXT 'ptree)
|
|
|
|
|
(define DECODABLE_EXTENSIONS (list MARKUP_SOURCE_EXT PTREE_SOURCE_EXT))
|
|
|
|
|
(define reader-mode-auto 'auto)
|
|
|
|
|
(define reader-mode-preproc 'pre)
|
|
|
|
|
(define reader-mode-markup 'markup)
|
|
|
|
|
(define reader-mode-ptree 'ptree)
|
|
|
|
|
|
|
|
|
|
(define decodable-extensions (list markup-source-ext ptree-source-ext))
|
|
|
|
|
|
|
|
|
|
(define DEFAULT_PTREE "main.ptree")
|
|
|
|
|
(define PTREE_ROOT_NODE 'ptree-root)
|
|
|
|
|
(define default-ptree "main.ptree")
|
|
|
|
|
(define ptree-root-node 'ptree-root)
|
|
|
|
|
|
|
|
|
|
(define TEMPLATE_SOURCE_PREFIX "-")
|
|
|
|
|
(define EXPRESSION_DELIMITER #\◊)
|
|
|
|
|
(define TEMPLATE_FIELD_DELIMITER EXPRESSION_DELIMITER)
|
|
|
|
|
(define template-source-prefix "-")
|
|
|
|
|
(define expression-delimiter #\◊)
|
|
|
|
|
(define template-field-delimiter expression-delimiter)
|
|
|
|
|
|
|
|
|
|
(define DEFAULT_TEMPLATE_PREFIX "main")
|
|
|
|
|
(define TEMPLATE_EXT 'pt)
|
|
|
|
|
(define FALLBACK_TEMPLATE "fallback.html.pt")
|
|
|
|
|
(define TEMPLATE_META_KEY "template")
|
|
|
|
|
(define default-template-prefix "main")
|
|
|
|
|
(define template-ext 'pt)
|
|
|
|
|
(define fallback-template "fallback.html.pt")
|
|
|
|
|
(define template-meta-key "template")
|
|
|
|
|
|
|
|
|
|
(define MAIN_POLLEN_EXPORT 'main)
|
|
|
|
|
(define main-pollen-export 'main)
|
|
|
|
|
|
|
|
|
|
(define EXTRAS_DIR (string->path "pollen-require"))
|
|
|
|
|
(define extras-dir (string->path "pollen-require"))
|
|
|
|
|
|
|
|
|
|
(define MISSING_FILE_BOILERPLATE "#lang pollen\n\n")
|
|
|
|
|
(define missing-file-boilerplace "#lang pollen\n\n")
|
|
|
|
|
|
|
|
|
|
(define LINE_BREAK "\n")
|
|
|
|
|
(define PARAGRAPH_BREAK "\n\n")
|
|
|
|
|
(define line-break "\n")
|
|
|
|
|
(define paragraph-break "\n\n")
|
|
|
|
|
|
|
|
|
|
(define OUTPUT_SUBDIR 'public)
|
|
|
|
|
(define output-subdir 'public)
|
|
|
|
|
|
|
|
|
|
;;(require racket/string racket/port racket/system)
|
|
|
|
|
;; todo: is path to racket already available as an environment variable?
|
|
|
|
|
;; e.g., (find-system-path 'xxx)? Because this next line is sort of slow
|
|
|
|
|
;;(define RACKET_PATH (string-trim (with-output-to-string (λ() (system "which racket")))))
|
|
|
|
|
(define RACKET_PATH "/usr/bin/racket") ;; todo: this won't always work
|
|
|
|
|
(define racket-path "/usr/bin/racket")
|
|
|
|
|
|
|
|
|
|
(define COMMAND_FILE "polcom")
|
|
|
|
|
(define command-file "polcom")
|
|
|
|
|
|
|
|
|
|
(define RESERVED_PATHS
|
|
|
|
|
(map string->path (list COMMAND_FILE (path->string EXTRAS_DIR) "poldash.css" "compiled")))
|
|
|
|
|
(define reserved-paths
|
|
|
|
|
(map string->path (list command-file (path->string extras-dir) "poldash.css" "compiled")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define CURRENT_PROJECT_ROOT (make-parameter (current-directory)))
|
|
|
|
|
(define current-project-root (make-parameter (current-directory)))
|
|
|
|
|
|
|
|
|
|
(define SERVER_PORT 8088)
|
|
|
|
|
(define server-port 8088)
|
|
|
|
|
|
|
|
|
|
(define DASHBOARD_NAME "index.ptree")
|
|
|
|
|
(define DASHBOARD_CSS "poldash.css")
|
|
|
|
|
(define dashboard-name "index.ptree")
|
|
|
|
|
(define dashboard-css "poldash.css")
|
|
|
|
|
|
|
|
|
|
(define current-module-root (make-parameter #f))
|
|
|
|
|
(define current-server-extras-path (make-parameter #f))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define reader-mode-auto 'auto)
|
|
|
|
|
(define reader-mode-preproc 'pre)
|
|
|
|
|
(define reader-mode-markup 'markup)
|
|
|
|
|
(define reader-mode-ptree 'ptree)
|
|
|
|
|