adding command to print the runtime.

This commit is contained in:
Danny Yoo 2011-05-30 11:30:28 -04:00
parent 21a405fb6f
commit 5238d2b389

View File

@ -6,7 +6,8 @@
racket/string racket/string
racket/path racket/path
"make-structs.rkt" "make-structs.rkt"
"js-assembler/package.rkt") "js-assembler/package.rkt"
"js-assembler/get-runtime.rkt")
;; Usage: ;; Usage:
@ -14,11 +15,19 @@
;; * Build standalone .xhtml application. ;; * Build standalone .xhtml application.
;; ;;
;; $ whalesong build main-module-name.rkt ;; $ whalesong build main-module-name.rkt
;;
;;
;; * Print out the runtime library to standard output.
;;
;; $ whalesong get-runtime
(define commands `((build (define commands `((build
,(lambda (args) ,(lambda (args)
(do-the-build args))))) (do-the-build args)))
(get-runtime
,(lambda (args)
(print-the-runtime)))))
;; listof string ;; listof string
(define command-names (map (lambda (x) (symbol->string (car x))) (define command-names (map (lambda (x) (symbol->string (car x)))
@ -61,7 +70,15 @@
(make-ModuleSource (build-path f)) (make-ModuleSource (build-path f))
op)) op))
#:exists 'replace))))) #:exists 'replace)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (print-the-runtime)
(display (get-runtime)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(at-toplevel) (at-toplevel)