From 6766be5427b1788a44e07151e3fabe33ec4f8b37 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 11 Mar 2022 05:52:21 -0400 Subject: Added an easy way to export Lux functionality to host programs (everywhere else). --- lux-js/commands.md | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'lux-js/commands.md') diff --git a/lux-js/commands.md b/lux-js/commands.md index 26296c771..a7859d1e0 100644 --- a/lux-js/commands.md +++ b/lux-js/commands.md @@ -1,45 +1,35 @@ -# Test - +# Develop ``` -cd ~/lux/lux-js/ && lein lux auto test -cd ~/lux/lux-js/ && lein clean && lein lux auto test +cd ~/lux/lux-js/ \ +&& lux clean \ +&& lux with js auto build ``` # Build ``` -cd ~/lux/lux-js/ \ -&& lux clean \ -&& lux with js auto build - cd ~/lux/lux-js/ \ && lux clean \ && lux with js build \ && mv target/program.js lux.js -## Develop -cd ~/lux/lux-js/ \ -&& lein clean \ -&& lein lux auto build - ## Build JVM-based compiler cd ~/lux/lux-js/ \ -&& lein clean \ -&& lein lux build \ +&& lux clean \ +&& lux with jvm build \ && mv target/program.jar jvm_based_compiler.jar ## Use JVM-based compiler to produce a JS/Node-based compiler. ## @ library/lux/data/text TODO: Comment/turn-off when generating a JS compiler using a JVM-based compiler because Nashorn's implementation of "replaceAll" is incorrect. cd ~/lux/lux-js/ \ -&& lein clean \ +&& lux clean \ && time java -jar jvm_based_compiler.jar build --source ~/lux/lux-js/source --target ~/lux/lux-js/target --module program \ && mv target/program.js node_based_compiler.js ## Use JS/Node-based compiler to produce another JS/Node-based compiler. cd ~/lux/lux-js/ \ -&& lein clean \ -&& node --stack_size=8192 node_based_compiler.js build --source ~/lux/lux-js/source --target ~/lux/lux-js/target --module program \ -&& mv target/program.js lux.js +&& lux clean \ +&& node --stack_size=8192 node_based_compiler.js build --source ~/lux/lux-js/source --target ~/lux/lux-js/target --module program ``` # Try @@ -47,7 +37,7 @@ cd ~/lux/lux-js/ \ ``` ## Compile Lux's Standard Library's tests using a JS/Node-based compiler. cd ~/lux/stdlib/ \ -&& lein clean \ +&& lux clean \ && node --stack_size=8192 ~/lux/lux-js/target/program.js build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux \ && node ~/lux/stdlib/target/program.js ``` @@ -56,6 +46,6 @@ cd ~/lux/stdlib/ \ ``` cd ~/lux/lux-js/ \ -&& mvn install:install-file -Dfile=target/program.js -DgroupId=com.github.luxlang -DartifactId=lux-js -Dversion=0.6.5-SNAPSHOT -Dpackaging=js +&& mvn install:install-file -Dfile=target/program.js -DgroupId=com.github.luxlang -DartifactId=lux-js -Dversion=0.6.6-SNAPSHOT -Dpackaging=js ``` -- cgit v1.2.3