@danielx/civet 0.2.14 → 0.3.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
@@ -15,8 +15,8 @@ Quickstart Guide
15
15
  npm install -g @danielx/civet
16
16
  # Compile civet source file to typescript
17
17
  civet < source.civet > output.ts
18
- # Execute a civet source file in node
19
- node --loader @danielx/civet/register.mjs source.civet
18
+ # Execute a civet source file in node using ts-node
19
+ node --loader ts-node/esm --loader @danielx/civet/esm source.civet
20
20
  ```
21
21
 
22
22
  ![image](https://user-images.githubusercontent.com/18894/184558519-b675a903-7490-43ba-883e-0d8addacd4b9.png)
@@ -89,9 +89,10 @@ Things Kept from CoffeeScript
89
89
  - `@` This shorthand `@` -> `this`, `@id` -> `this.id`
90
90
  - Prototype shorthand `X::` -> `X.prototype`, `X::a` -> `X.prototype.a`
91
91
  - Postfix `if/unless`
92
+ - Block Strings `"""` / `'''`
92
93
  - JSX 😿
93
94
  - TODO
94
- - [ ] `"""` Strings (for compatibility with existing .coffee code)
95
+ - [ ] `"""` String interpolation (for compatibility with existing .coffee code)
95
96
  - [ ] Chained comparisons
96
97
 
97
98
  Things Removed from CoffeeScript
@@ -103,11 +104,11 @@ Things Removed from CoffeeScript
103
104
  - `do` keyword (replaced with JS `do`)
104
105
  - `for from` (use JS `for of`)
105
106
  - Array slices `list[0...2]` (use `list.slice(0, 2)`)
106
- - Slice assignment `numbers[3..6] = [-3, -4, -5, -6]`
107
+ - Slice assignment `numbers[3..6] = [-3, -4, -5, -6]` (use `numbers.splice(3, 4, -3, -4, -5, -6)`)
107
108
  - Comprensions (a case could be made for keeping them)
108
109
  - Iteration expression results
109
110
  - Implicit declarations
110
- - Implicit returns (will probably add later)
111
+ - Implicit returns (will probably add later at least for single line functions)
111
112
  - Rest parameter in any assignment position (might add later)
112
113
  - Postfix `while/until`
113
114
  - `///` Heregexp