@danielx/civet 0.1.0 → 0.2.1
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 +11 -1
- package/dist/browser.js +410 -59
- package/dist/browser.js.map +2 -2
- package/dist/civet +9 -9
- package/dist/cli.js.map +3 -3
- package/dist/main.js +410 -59
- package/package.json +5 -3
- package/register.js +12 -0
- package/register.mjs +40 -0
package/README.md
CHANGED
|
@@ -7,6 +7,11 @@ A new CoffeeScript. Much closer to ES2015+ (for better or worse).
|
|
|
7
7
|
|
|
8
8
|
Also TypeScript, the sky is the limit.
|
|
9
9
|
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g @danielx/civet
|
|
12
|
+
civet < source.civet > output.ts
|
|
13
|
+
```
|
|
14
|
+
|
|
10
15
|

|
|
11
16
|
|
|
12
17
|
Code Sample
|
|
@@ -55,8 +60,11 @@ Things Kept from CoffeeScript
|
|
|
55
60
|
- OptionalChain shorthand for index and function application `a?[b]` -> `a?.[b]`, `a?(b)` -> `a?.(b)`
|
|
56
61
|
- `@` -> `this`
|
|
57
62
|
- `@id` -> `this.id`
|
|
63
|
+
- JSX 😿
|
|
58
64
|
- TODO
|
|
59
|
-
- `"""` Strings (for compatibility with existing .coffee code)
|
|
65
|
+
- [ ] `"""` Strings (for compatibility with existing .coffee code)
|
|
66
|
+
- [ ] `///` Heregexp
|
|
67
|
+
- [ ] Chained comparisons
|
|
60
68
|
|
|
61
69
|
Things Removed from CoffeeScript
|
|
62
70
|
---
|
|
@@ -65,6 +73,7 @@ Things Removed from CoffeeScript
|
|
|
65
73
|
- `off` (use `false`)
|
|
66
74
|
- `do` keyword (replaced with JS `do`)
|
|
67
75
|
- `for from` (use JS `for of`)
|
|
76
|
+
- Array slices `list[0...2]` (use `list.slice(0, 2)`)
|
|
68
77
|
- Comprensions (a case could be made for keeping them)
|
|
69
78
|
- Iteration expression results
|
|
70
79
|
- Implicit declarations
|
|
@@ -93,6 +102,7 @@ Things Added that CoffeeScript didn't
|
|
|
93
102
|
- `case` statement
|
|
94
103
|
- `while`
|
|
95
104
|
- `do`
|
|
105
|
+
- Const assignment shorthand `a := b` -> `const a = b`; `{a, b} := c` -> `const {a, b} = c`
|
|
96
106
|
- Convenience for ES6+ Features
|
|
97
107
|
- `<` as `extends` shorthand
|
|
98
108
|
- `@#id` -> `this.#id` shorthand for private identifiers
|