aboutsummaryrefslogtreecommitdiff
path: root/lux-js/source
diff options
context:
space:
mode:
Diffstat (limited to 'lux-js/source')
-rw-r--r--lux-js/source/program.lux46
1 files changed, 22 insertions, 24 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux
index 36e2fd023..b670da4fa 100644
--- a/lux-js/source/program.lux
+++ b/lux-js/source/program.lux
@@ -60,13 +60,13 @@
["[0]" platform {"+" Platform}]]
[meta
["[0]" cli]
+ ["[0]" context]
[archive {"+" Archive}
["[0]" unit]]
["[0]" packager "_"
["[1]" script]]]]]]]
[program
- ["/" compositor
- ["[1][0]" static]]])
+ ["/" compositor]])
(exception: (null_has_no_lux_representation [code (Maybe _.Expression)])
(case code
@@ -671,26 +671,24 @@
(list))))
(program: [service cli.service]
- (let [extension ".js"]
- (exec (do async.monad
- [platform (async.future ..platform)
- _ (/.compiler [/static.#host @.js
- /static.#host_module_extension extension
- /static.#target (cli.target service)
- /static.#artifact_extension extension]
- ..expander
- analysis.bundle
- (io.io platform)
- generation.bundle
- (function.constant extension/bundle.empty)
- ..program
- [(And Register Text) _.Expression _.Statement]
- ..extender
- service
- [(packager.package _.use_strict _.code _.then ..scope)
- (format (cli.target service)
- (# (value@ platform.#&file_system platform) separator)
- "program"
- extension)])]
- (..declare_success! []))
+ (let [context (context.js (cli.target service))]
+ (exec
+ (do async.monad
+ [platform (async.future ..platform)
+ _ (/.compiler context
+ ..expander
+ analysis.bundle
+ (io.io platform)
+ generation.bundle
+ (function.constant extension/bundle.empty)
+ ..program
+ [(And Register Text) _.Expression _.Statement]
+ ..extender
+ service
+ [(packager.package _.use_strict _.code _.then ..scope)
+ (format (cli.target service)
+ (# (value@ platform.#&file_system platform) separator)
+ "program"
+ (value@ context.#artifact_extension context))])]
+ (..declare_success! []))
(io.io []))))