@calcit/procs 0.8.59 → 0.9.0

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 CHANGED
@@ -42,13 +42,13 @@ To use Calcit in GitHub Actions, try [setup-cr](https://github.com/calcit-lang/s
42
42
  Snippets evaling:
43
43
 
44
44
  ```bash
45
- cr -e 'range 100'
45
+ cr eval 'range 100'
46
46
  ```
47
47
 
48
48
  multi-lines snippet:
49
49
 
50
50
  ```bash
51
- cr -e '
51
+ cr eval '
52
52
 
53
53
  println "|a demo"
54
54
 
@@ -85,8 +85,8 @@ cr compact.cirru --entry server
85
85
  It compiles to JavaScript and runs in consistet semantics. However it might require a lot of JavaScript interop.
86
86
 
87
87
  ```bash
88
- cr compact.cirru --emit-js # compile to js
89
- cr compact.cirru --emit-js --emit-path=out/ # compile to js and save in `out/`
88
+ cr compact.cirru js # compile to js
89
+ cr compact.cirru js --emit-path=out/ # compile to js and save in `out/`
90
90
  ```
91
91
 
92
92
  By default, js code is generated to `js-out/`. You will need Vite or Node to run it, from an entry file:
@@ -139,12 +139,12 @@ I use these commands to run local examples:
139
139
  cargo run --bin cr -- calcit/test.cirru -1
140
140
 
141
141
  # run tests in Node.js
142
- cargo run --bin cr -- calcit/test.cirru --emit-js -1 && yarn try-js
142
+ cargo run --bin cr -- calcit/test.cirru -1 js && yarn try-js
143
143
 
144
144
  # run snippet
145
- cargo run --bin cr -- -e 'range 100'
145
+ cargo run --bin cr -- eval 'range 100'
146
146
 
147
- cr compact.cirru --emit-ir # compiles intermediate representation into program-ir.cirru
147
+ cr compact.cirru -1 ir # compiles intermediate representation into program-ir.cirru
148
148
  ```
149
149
 
150
150
  - [Cirru Parser](https://github.com/Cirru/parser.rs) for indentation-based syntax parsing.
@@ -11,14 +11,9 @@ let embedObject = (x) => {
11
11
  return null;
12
12
  }
13
13
  if (typeof x === "string") {
14
- return span({ whiteSpace: "pre-line", color: hsl(120, 70, 50), maxWidth: "100vw" }, `|${x}`);
14
+ return span({ whiteSpace: "pre", color: hsl(120, 70, 50), maxWidth: "100vw" }, `|${x}`);
15
15
  }
16
- return [
17
- "object",
18
- {
19
- object: x,
20
- },
21
- ];
16
+ return ["object", { object: x }];
22
17
  };
23
18
  /** camel case to kabab case */
24
19
  let kabab = (s) => {
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.8.59",
3
+ "version": "0.9.0",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^20.11.28",
@@ -10,12 +10,12 @@
10
10
  "compile": "rm -rfv lib/* && tsc",
11
11
  "procs-link": "ln -s ../../ node_modules/@calcit/procs",
12
12
  "cp-mac": "cargo build --release && rm -rfv builds/* && node scripts/cp-version.js && scp builds/* rsync-user@calcit-lang.org:/web-assets/repo/calcit-lang/binaries/macos/",
13
- "eval": "cargo run --bin cr -- -e",
13
+ "eval": "cargo run --bin cr -- eval",
14
14
  "check-all": "yarn compile && yarn try-rs && yarn try-js && yarn try-ir",
15
15
  "try-rs": "cargo run --bin cr -- calcit/test.cirru -1",
16
- "try-js-brk": "cargo run --bin cr -- calcit/test.cirru --emit-js -1 && node --inspect-brk js-out/main.mjs",
17
- "try-js": "cargo run --bin cr -- calcit/test.cirru --emit-js -1 && node js-out/main.mjs",
18
- "try-ir": "cargo run --bin cr -- calcit/test.cirru --emit-ir -1"
16
+ "try-js-brk": "cargo run --bin cr -- calcit/test.cirru -1 js && node --inspect-brk js-out/main.mjs",
17
+ "try-js": "cargo run --bin cr -- calcit/test.cirru -1 js && node js-out/main.mjs",
18
+ "try-ir": "cargo run --bin cr -- calcit/test.cirru -1 js"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.8.59",
3
+ "version": "0.9.0",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^20.11.28",
@@ -10,12 +10,12 @@
10
10
  "compile": "rm -rfv lib/* && tsc",
11
11
  "procs-link": "ln -s ../../ node_modules/@calcit/procs",
12
12
  "cp-mac": "cargo build --release && rm -rfv builds/* && node scripts/cp-version.js && scp builds/* rsync-user@calcit-lang.org:/web-assets/repo/calcit-lang/binaries/macos/",
13
- "eval": "cargo run --bin cr -- -e",
13
+ "eval": "cargo run --bin cr -- eval",
14
14
  "check-all": "yarn compile && yarn try-rs && yarn try-js && yarn try-ir",
15
15
  "try-rs": "cargo run --bin cr -- calcit/test.cirru -1",
16
- "try-js-brk": "cargo run --bin cr -- calcit/test.cirru --emit-js -1 && node --inspect-brk js-out/main.mjs",
17
- "try-js": "cargo run --bin cr -- calcit/test.cirru --emit-js -1 && node js-out/main.mjs",
18
- "try-ir": "cargo run --bin cr -- calcit/test.cirru --emit-ir -1"
16
+ "try-js-brk": "cargo run --bin cr -- calcit/test.cirru -1 js && node --inspect-brk js-out/main.mjs",
17
+ "try-js": "cargo run --bin cr -- calcit/test.cirru -1 js && node js-out/main.mjs",
18
+ "try-ir": "cargo run --bin cr -- calcit/test.cirru -1 js"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -22,14 +22,9 @@ let embedObject = (x: CalcitValue) => {
22
22
  return null;
23
23
  }
24
24
  if (typeof x === "string") {
25
- return span({ whiteSpace: "pre-line", color: hsl(120, 70, 50), maxWidth: "100vw" }, `|${x}`);
25
+ return span({ whiteSpace: "pre", color: hsl(120, 70, 50), maxWidth: "100vw" }, `|${x}`);
26
26
  }
27
- return [
28
- "object",
29
- {
30
- object: x,
31
- },
32
- ];
27
+ return ["object", { object: x }];
33
28
  };
34
29
 
35
30
  /** camel case to kabab case */