aboutsummaryrefslogtreecommitdiff
path: root/lux-js
diff options
context:
space:
mode:
authorEduardo Julian2021-03-10 10:32:30 -0400
committerEduardo Julian2021-03-10 10:32:30 -0400
commit0c75fd67e3fcfbfb09d8c11b6cf396084ce40a15 (patch)
treeaa95b07ad0a18e0b1dd92657330c7ccaa6202245 /lux-js
parentcbc41f10fb3e0e776767d2266b22068172b0f69a (diff)
Wrestling with JPHP.
Diffstat (limited to 'lux-js')
-rw-r--r--lux-js/commands.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/lux-js/commands.md b/lux-js/commands.md
new file mode 100644
index 000000000..ff0124850
--- /dev/null
+++ b/lux-js/commands.md
@@ -0,0 +1,45 @@
+# JavaScript compiler
+
+## Test
+
+```
+cd ~/lux/lux-js/ && lein lux auto test
+cd ~/lux/lux-js/ && lein clean && lein lux auto test
+```
+
+## Build
+
+```
+cd ~/lux/lux-js/ && lein lux auto build
+cd ~/lux/lux-js/ && lein clean && lein lux auto build
+
+## Build JVM-based compiler
+cd ~/lux/lux-js/ \
+&& lein clean \
+&& lein lux build \
+&& mv target/program.jar jvm_based_compiler.jar
+
+## Use JVM-based compiler to produce a JS/Node-based compiler.
+cd ~/lux/lux-js/ \
+&& lein 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 \
+&& time 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
+```
+
+## Try
+
+```
+## Compile Lux's Standard Library's tests using a JS/Node-based compiler.
+cd ~/lux/stdlib/ \
+&& lein clean \
+&& time node --stack_size=8192 ~/lux/lux-js/lux.js build --source ~/lux/stdlib/source --target ~/lux/stdlib/target --module test/lux
+
+node ~/lux/stdlib/target/program.js
+```
+