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 9fc8ed7
Showing
9 changed files
with
321 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,34 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: {} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: ACTIONS_ALLOW_UNSECURE_COMMANDS | ||
id: ACTIONS_ALLOW_UNSECURE_COMMANDS | ||
run: echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV | ||
|
||
- name: add cr | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/bin | ||
wget -O $GITHUB_WORKSPACE/bin/cr http://repo.calcit-lang.org/binaries/linux/cr | ||
chmod +x $GITHUB_WORKSPACE/bin/cr | ||
echo "::add-path::$GITHUB_WORKSPACE/bin" | ||
- name: "prepare modules" | ||
run: > | ||
mkdir -p ~/.config/calcit/modules/ && cd ~/.config/calcit/modules/ | ||
&& git clone https://github.com/calcit-lang/calcit-test.git | ||
- name: "test" | ||
run: 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,37 @@ | ||
|
||
{} (: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 $ {} | ||
:defs $ {} | ||
|calling-func $ quote | ||
defn calling-func () $ println "\"todo bcc" | ||
|main! $ quote | ||
defn main! () (run-tests) | ||
set-interval 2000 $ fn () (calling-func) | ||
|on-error $ quote | ||
defn on-error (message) (; draw-error-message message) | ||
|reload! $ quote | ||
defn reload! () $ echo "\"Reloaded." | ||
:ns $ quote | ||
ns app.main $ :require | ||
app.test :refer $ run-tests | ||
calcit.std.time :refer $ set-interval | ||
|app.test $ {} | ||
:defs $ {} | ||
|main! $ quote | ||
defn main! () $ run-tests | ||
|reload! $ quote | ||
defn reload! () $ println "\"TODO reload" | ||
|run-tests $ quote | ||
defn run-tests () (reset! *quit-on-failure? true) (test-add) | ||
|test-add $ quote | ||
deftest test-add $ testing |add | ||
is $ = 2 (+ 1 1) | ||
:ns $ 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,8 @@ | ||
{ | ||
"version": "0.0.7", | ||
"dependencies": { | ||
"@calcit/procs": "^0.5.41" | ||
}, | ||
"scripts": {}, | ||
"devDependencies": {} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.