Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joewatt95 committed Apr 1, 2024
1 parent f800e47 commit 0813892
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/webeditor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Precompile SWI-Prolog files to qlf
run: pnpm build:swipl-public-qlf

- name: Build web editor app
- name: Build Clojurescript web editor app
run: pnpm build:webeditor

- name: Setup Pages
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
"preinstall": "npx only-allow pnpm",
"shadow-cljs:release": "shadow-cljs release app",
"start": "shadow-cljs watch webeditor",
"build:prod": "shadow-cljs release app",
"build:webeditor": "shadow-cljs release webeditor",
"build:dev": "shadow-cljs compile app",
"build:browser-esm-lib": "shadow-cljs release browser-esm-lib",
"build:py-node-lib": "shadow-cljs release py-node-lib",
"build:node-lib": "shadow-cljs release node-lib",
"build:swipl-qlfs": "cd public/resources/swipl && swipl -t 'qcompile(prelude, [include(user)])' && cd ../../../src/l4_lp_py/swipl/prolog && swipl -t 'qcompile(prelude, [include(user)])' && cd ../../../../../../../",
"build:swipl-public-qlf": "cd public/resources/swipl && swipl -t 'qcompile(prelude, [include(user)])'",
"build:all": "shadow-cljs release app && shadow-cljs release py-node-lib && shadow-cljs release node-lib",
"build:all": "shadow-cljs release webeditor && && shadow-cljs release browser-esm-lib && shadow-cljs release node-lib && shadow-cljs release py-node-lib",
"run:node-eg": "poetry run node public/node_example_usage.js",
"run:py-eg": "cd src/l4_lp_py && poetry run python example_usage.py && cd -",
"server": "shadow-cljs server"
Expand Down
49 changes: 24 additions & 25 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
{:deps true
:dev-http {8000 "public"}
:builds
{:app
{:webeditor
{:target :esm
:output-dir "public/js"
:modules {:main {:init-fn l4-lp.main/init}}
:devtools {:before-load l4-lp.main/stop
:after-load l4-lp.main/start}
:compiler-options {:output-feature-set :es2021
:externs ["datascript/externs.js"]}}
:browser-esm-lib
{:target :esm
:output-dir "public/js"
:modules
Expand All @@ -20,19 +28,9 @@
:query_and_trace
l4-lp.swipl.js.wasm-query/query-and-trace-js!}}}}

:webeditor
{:target :esm
:output-dir "public/js"
:modules {:main {:init-fn l4-lp.main/init}}
:devtools {:before-load l4-lp.main/stop
:after-load l4-lp.main/start}
:compiler-options {:output-feature-set :es2021
:externs ["datascript/externs.js"]}}

:py-node-lib
:node-lib
{:target :node-library
:output-to "src/l4_lp_py/_l4_lp_nodejs_lib/nodejs_lib.js"
;; :js-options {:js-provider :import}
:output-to "public/js/l4_lp_nodejs_lib.js"
:compiler-options {:output-feature-set :es2021
:externs ["datascript/externs.js"]}
:optimizations :advanced
Expand All @@ -43,12 +41,19 @@
:l4_program_edn_str_to_prolog_program_str
l4-lp.syntax.l4-to-prolog/l4-program->prolog-program-str

:swipl_stack_trace_to_js
l4-lp.swipl.js.common.swipl-js-to-clj/swipl-stack-trace->js}}
;; :query_and_trace
;; l4-lp.core/query-and-trace

:node-lib
:init_swipl_engine
l4-lp.swipl.js.janus-py-nodejs-query/init-swipl-engine!

:query_and_trace
l4-lp.swipl.js.janus-py-nodejs-query/query-and-trace-js!}}

:py-node-lib
{:target :node-library
:output-to "public/js/l4_lp_nodejs_lib.js"
:output-to "src/l4_lp_py/_l4_lp_nodejs_lib/nodejs_lib.js"
;; :js-options {:js-provider :import}
:compiler-options {:output-feature-set :es2021
:externs ["datascript/externs.js"]}
:optimizations :advanced
Expand All @@ -59,11 +64,5 @@
:l4_program_edn_str_to_prolog_program_str
l4-lp.syntax.l4-to-prolog/l4-program->prolog-program-str

;; :query_and_trace
;; l4-lp.core/query-and-trace

:init_swipl_engine
l4-lp.swipl.js.janus-py-nodejs-query/init-swipl-engine!

:query_and_trace
l4-lp.swipl.js.janus-py-nodejs-query/query-and-trace-js!}}}}
:swipl_stack_trace_to_js
l4-lp.swipl.js.common.swipl-js-to-clj/swipl-stack-trace->js}}}}

0 comments on commit 0813892

Please sign in to comment.