generated from calcit-lang/calcit-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cec7fc5
Showing
10 changed files
with
341 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
calcit.cirru -diff linguist-generated | ||
yarn.lock -diff linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
|
||
- uses: supplypike/setup-bin@v3 | ||
with: | ||
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.0/cr' | ||
name: 'cr' | ||
version: '0.8.0' | ||
|
||
- uses: supplypike/setup-bin@v3 | ||
with: | ||
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.0/caps' | ||
name: 'caps' | ||
version: '0.8.0' | ||
|
||
- name: "test" | ||
run: caps --ci && cr -1 --entry test | ||
|
||
- run: cr --emit-js -1 --entry test && yarn && node ./main.mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
.compact-inc.cirru | ||
.calcit-error.cirru | ||
|
||
js-out/ | ||
node_modules | ||
|
||
example/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
Calcit Workflow | ||
---- | ||
|
||
> running in both Calcit and Calcit-js, with hot code reload. | ||
### Usages | ||
|
||
Install [Calcit](https://github.com/calcit-lang/calcit) to run demo: | ||
|
||
```bash | ||
cr -1 # run once | ||
|
||
cr # run and watch | ||
``` | ||
|
||
run tests: | ||
|
||
```bash | ||
cr -1 --entry test | ||
``` | ||
|
||
run test in JavaScript: | ||
|
||
```bash | ||
cr --emit-js -1 --entry test # emit-js once | ||
node main.mjs # run code | ||
``` | ||
|
||
### Workflow | ||
|
||
https://github.com/calcit-lang/calcit-workflow | ||
|
||
### License | ||
|
||
MIT |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
{} (:package |app) | ||
:configs $ {} (:init-fn |app.main/main!) (:reload-fn |app.main/reload!) (:version |0.0.1) | ||
:modules $ [] |calcit-test/ |calcit.std/ | ||
:entries $ {} | ||
:test $ {} (:init-fn |app.test/main!) (:reload-fn |app.test/reload!) | ||
:modules $ [] |calcit-test/ | ||
:files $ {} | ||
|app.main $ %{} :FileEntry | ||
:defs $ {} | ||
|calling-func $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn calling-func () $ println "\"todo bcc" | ||
|main! $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn main! () (run-tests) | ||
set-interval 2000 $ fn () (calling-func) | ||
|on-error $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn on-error (message) (; draw-error-message message) | ||
|reload! $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn reload! () $ echo "\"Reloaded." | ||
:ns $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
ns app.main $ :require | ||
app.test :refer $ run-tests | ||
calcit.std.time :refer $ set-interval | ||
|app.test $ %{} :FileEntry | ||
:defs $ {} | ||
|main! $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn main! () $ run-tests | ||
|reload! $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn reload! () $ println "\"TODO reload" | ||
|run-tests $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
defn run-tests () (reset! *quit-on-failure? true) (test-add) | ||
|test-add $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
deftest test-add $ testing |add | ||
is $ = 2 (+ 1 1) | ||
:ns $ %{} :CodeEntry (:doc |) | ||
:code $ quote | ||
ns app.test $ :require | ||
calcit-test.core :refer $ deftest testing is *quit-on-failure? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { main_$x_, reload_$x_ } from "./js-out/app.test.mjs" | ||
|
||
main_$x_() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
{} | ||
:dependencies $ {} | ||
|calcit-lang/calcit-test |main | ||
|calcit-lang/calcit.std |main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"version": "0.0.7", | ||
"dependencies": { | ||
"@calcit/procs": "^0.8.0" | ||
}, | ||
"scripts": {}, | ||
"devDependencies": {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.