getting the initial main module in place.
This commit is contained in:
parent
b490042567
commit
d5c7298263
|
@ -9,6 +9,7 @@
|
||||||
racket/pretty
|
racket/pretty
|
||||||
json
|
json
|
||||||
"parser/parse-bytecode.rkt"
|
"parser/parse-bytecode.rkt"
|
||||||
|
"parser/path-rewriter.rkt"
|
||||||
"compiler/compiler.rkt"
|
"compiler/compiler.rkt"
|
||||||
"compiler/compiler-structs.rkt"
|
"compiler/compiler-structs.rkt"
|
||||||
"make/make-structs.rkt"
|
"make/make-structs.rkt"
|
||||||
|
@ -221,32 +222,33 @@
|
||||||
(make-directory* (current-output-dir)))
|
(make-directory* (current-output-dir)))
|
||||||
|
|
||||||
|
|
||||||
(define main-module-path (make-output-js-filename #f))
|
|
||||||
;; Write out the main module and its other module dependencies.
|
;; Write out the main module and its other module dependencies.
|
||||||
(parameterize ([current-on-resource on-resource])
|
(parameterize ([current-on-resource on-resource])
|
||||||
(call-with-output-file* (make-output-js-filename #f)
|
(call-with-output-file* (make-output-js-filename #f)
|
||||||
(lambda (op)
|
(lambda (op)
|
||||||
(display (get-runtime) op))
|
(display (get-runtime) op))
|
||||||
#:exists 'replace)
|
#:exists 'replace)
|
||||||
(call-with-output-file* main-module-path
|
(call-with-output-file* (make-output-js-filename #f)
|
||||||
(lambda (op)
|
(lambda (op)
|
||||||
(display (get-inert-code (make-MainModuleSource
|
(display (get-inert-code (make-MainModuleSource
|
||||||
(normalize-path (build-path f)))
|
(normalize-path (build-path f)))
|
||||||
make-output-js-filename)
|
make-output-js-filename)
|
||||||
op))
|
op))
|
||||||
#:exists 'replace))
|
#:exists 'replace))
|
||||||
|
|
||||||
|
;; We want to get the symbolic name of the main module:
|
||||||
|
(define main-module-key (rewrite-path (normalize-path (build-path f))))
|
||||||
|
|
||||||
|
|
||||||
(when (current-with-legacy-ie-support?)
|
(when (current-with-legacy-ie-support?)
|
||||||
(for ([r ie-resources]) (on-resource r)))
|
(for ([r ie-resources]) (on-resource r)))
|
||||||
|
|
||||||
(fprintf (current-report-port)
|
(fprintf (current-report-port)
|
||||||
(format "Writing html ~s\n" (build-path (current-output-dir) output-html-filename)))
|
(format "Writing html ~s\n" (build-path (current-output-dir) output-html-filename)))
|
||||||
(define dynamically-loaded-modules
|
(define dynamically-loaded-modules
|
||||||
'()
|
(for/list ([(key path) module-mappings]
|
||||||
#;(remove (file-name-from-path main-module-path)
|
#:unless (eq? key main-module-key))
|
||||||
(for/list ([(key path) module-mappings])
|
(file-name-from-path path)))
|
||||||
(file-name-from-path path))))
|
|
||||||
(displayln dynamically-loaded-modules)
|
|
||||||
(call-with-output-file* (build-path (current-output-dir) output-html-filename)
|
(call-with-output-file* (build-path (current-output-dir) output-html-filename)
|
||||||
(lambda (op)
|
(lambda (op)
|
||||||
(display (get-html-template
|
(display (get-html-template
|
||||||
|
|
Loading…
Reference in New Issue
Block a user