@calcit/procs 0.6.23 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -5
- package/lib/calcit.procs.mjs +1 -1
- package/package.json +1 -1
- package/ts-src/calcit.procs.mts +1 -1
package/README.md
CHANGED
|
@@ -66,8 +66,18 @@ Run with a [compact.cirru](https://github.com/calcit-lang/lilac/blob/main/compac
|
|
|
66
66
|
cr compact.cirru -1 # run only once
|
|
67
67
|
|
|
68
68
|
cr compact.cirru # watch mode enabled by default
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
By default Calcit reads `:init-fn` and `:reload-fn` inside `compact.cirru` configs. You may also specify functions,
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
cr compact.cirru --init-fn='app.main/main!' --reload-fn='app.main/reload!'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
and even configure `:entries` in `compact.cirru`:
|
|
69
78
|
|
|
70
|
-
|
|
79
|
+
```bash
|
|
80
|
+
cr compact.cirru --entry server
|
|
71
81
|
```
|
|
72
82
|
|
|
73
83
|
### JavaScript codegen
|
|
@@ -97,9 +107,18 @@ Read more in [Respo Calcit Workflow](https://github.com/calcit-lang/respo-calcit
|
|
|
97
107
|
|
|
98
108
|
### Modules
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
`package.cirru` declares dependencies that need to download, which correspond to repositories on GitHub. Specify a branch or a tag:
|
|
111
|
+
|
|
112
|
+
```cirru
|
|
113
|
+
{}
|
|
114
|
+
:dependencies $ {}
|
|
115
|
+
|calcit-lang/memof |0.0.11
|
|
116
|
+
|calcit-lang/lilac |main
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Run `caps` to download. Sources are downloaded into `~/.config/calcit/modules/`. If a module contains `build.sh`, it will be executed mostly for compiling Rust dylibs.
|
|
101
120
|
|
|
102
|
-
|
|
121
|
+
To load modules, use `:modules` configuration in `calcit.cirru` and `compact.cirru`:
|
|
103
122
|
|
|
104
123
|
```cirru
|
|
105
124
|
:configs $ {}
|
|
@@ -111,8 +130,6 @@ i.e. `~/.config/calcit/modules/memof/compact.cirru`.
|
|
|
111
130
|
|
|
112
131
|
Modules that ends with `/`s are automatically suffixed `compact.cirru` since it's the default filename.
|
|
113
132
|
|
|
114
|
-
To load modules in CI environments, make use of `git clone`.
|
|
115
|
-
|
|
116
133
|
### Development
|
|
117
134
|
|
|
118
135
|
I use these commands to run local examples:
|
package/lib/calcit.procs.mjs
CHANGED
package/package.json
CHANGED
package/ts-src/calcit.procs.mts
CHANGED