diff options
Diffstat (limited to 'lux-js')
-rw-r--r-- | lux-js/source/program.lux | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index f927a0cef..9cd93a9eb 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -483,5 +483,20 @@ #platform.phase js.generate #platform.runtime runtime.generate}))) +(def: (program program) + (-> _.Expression _.Statement) + (let [@process (_.var "process") + raw-inputs (_.? (|> (|> @process _.type-of (_.= (_.string "undefined")) _.not) + (_.and (|> @process (_.the "argv")))) + (|> @process (_.the "argv")) + (_.array (list)))] + (_.statement (_.apply/2 program + (runtime.lux//program-args raw-inputs) + _.null)))) + (program: [{service /cli.service}] - (/.compiler ..expander ..platform extension.bundle service)) + (/.compiler ..expander + ..platform + extension.bundle + ..program + service)) |