aboutsummaryrefslogtreecommitdiff
path: root/lux-js/commands.md
diff options
context:
space:
mode:
authorEduardo Julian2022-03-11 05:52:21 -0400
committerEduardo Julian2022-03-11 05:52:21 -0400
commit6766be5427b1788a44e07151e3fabe33ec4f8b37 (patch)
tree8d8aa5c1d8fd4a9f733f82c48080284ecd4ec31a /lux-js/commands.md
parentac2c19d93407b00c89513f0f81e9cbbd1425bd9a (diff)
Added an easy way to export Lux functionality to host programs (everywhere else).
Diffstat (limited to '')
-rw-r--r--lux-js/commands.md32
1 files changed, 11 insertions, 21 deletions
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,8 +1,8 @@
-# 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
@@ -10,36 +10,26 @@ cd ~/lux/lux-js/ && lein clean && lein lux auto test
```
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
```