Skip to content

Commit 12b1148

Browse files
authored
Merge pull request #4 from reactale/devts
Typescript migration complete
2 parents 47f4db8 + 1f360b1 commit 12b1148

76 files changed

Lines changed: 3975 additions & 3344 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bower_components
3535
.lock-wscript
3636

3737
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
38+
# build/Release
3939

4040
# Dependency directories
4141
node_modules/
@@ -80,7 +80,7 @@ typings/
8080

8181
# Nuxt.js build / generate output
8282
.nuxt
83-
dist
83+
# dist
8484

8585
# Gatsby files
8686
.cache/

dist/external/materialize.min.css

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/external/materialize.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/favicon.ico

1.12 KB
Binary file not shown.

dist/index.html

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet">
8+
<link rel="stylesheet" href="style.css" />
9+
<title>Reacto Test</title>
10+
</head>
11+
<body>
12+
13+
<div class="container main-container">
14+
<h1>Reacto Tester</h1>
15+
<div class="row">
16+
<div class="col-sm-12 col-lg-6">
17+
<label for="input-rtext" class="form-label">Reactive Text</label>
18+
<textarea class="form-control monofont" id="input-rtext" rows="9" placeholder="type text+reacto here ..."></textarea>
19+
</div>
20+
<div class="col-sm-12 col-lg-6">
21+
<label for="output-text" class="form-label">Converted Text</label>
22+
<!-- <textarea class="form-control" id="output-text" rows="5"></textarea> -->
23+
<pre id="output-text"></pre>
24+
</div>
25+
</div>
26+
<div class="d-flex flex-row-reverse mt-4">
27+
<button id="btn-convert" type="button" class="btn btn-danger">Convert</button>
28+
</div>
29+
30+
<div class="mt-5">
31+
<h2>Examples</h2>
32+
<pre>
33+
((r.0 Chaining Conditionals))
34+
35+
((r.if. 5 > 3)) {{ Oh Yeah ... }}
36+
37+
((r.if. 5 > 3)) ((r.if.and. 5 > 2)) {{ AND SUCCESSFUL 1 ... }}
38+
((r.if. 5 > 3)) ((r.if.and. 5 > 7)) {{ Should not be shown, 2nd cond false ... }}
39+
((r.if. 5 > 5)) ((r.if.and. 5 > 2)) {{ Should not be shown, 1st cond false ... }}
40+
((r.if. 5 > 5)) ((r.if.and. 1 > 2)) {{ Should not be shown, BOTH cond false ... }}
41+
42+
((r.if. 5 > 3)) ((r.if.or. 5 > 2)) {{ Both True ... }}
43+
((r.if. 5 > 3)) ((r.if.or. 5 > 7)) {{ True ... }}
44+
((r.if. 5 > 5)) ((r.if.or. 5 > 2)) {{ True ... }}
45+
((r.if. 5 > 5)) ((r.if.or. 1 > 2)) {{ BOTH cond false ... }}
46+
</pre>
47+
<pre>
48+
Today is =>
49+
((r.cfg.printOff)) # TURN OFF PRINTING
50+
English: ((r.cfg.setLocale.en))((r.dt.day))
51+
Bengali: ((r.cfg.setLocale.bn))((r.dt.day))
52+
Bhojpuri: ((r.cfg.setLocale.bh))((r.dt.day))
53+
Hindi: ((r.cfg.setLocale.hi))((r.dt.day))
54+
((r.cfg.printOn)) # TURN ON PRINTING
55+
Assammese: ((r.cfg.setLocale.as))((r.dt.day))
56+
Gujrati: ((r.cfg.setLocale.gu))((r.dt.day))
57+
Marathi: ((r.cfg.setLocale.mr))((r.dt.day))
58+
Chinese: ((r.cfg.setLocale.zh))((r.dt.day))
59+
</pre>
60+
61+
<pre class="mt-4">
62+
((r.dt.date)) yields today's date, a number only, e.g. 27
63+
((r.dt.day)) yields current day's name in the week, e.g. Sunday
64+
((r.dt.month)) yields current month, e.g. February
65+
((r.dt.year)) yields current year, e.g. 2018
66+
((r.dt.hour)) yields current hour in 12 hour format, e.g. 9
67+
((r.dt.hour24)) yields current hour in 24 hour format, e.g. 21
68+
((r.dt.min)) yields current minute, a number only, e.g. 18
69+
((r.dt.sec)) yields current minute, a number only, e.g. 36
70+
</pre>
71+
72+
<pre class="mt-4">
73+
Adding number and reacto
74+
------------------------
75+
((r.cfg.setLocale.bn))\
76+
((r.var.n1 = 1))\
77+
((r.var.n2 = 2))\
78+
\
79+
((r.calc. r.var.n1 + r.var.n2))
80+
((r.calc. r.var.n1 + 8))
81+
((r.calc. 16 + r.var.n2))
82+
((r.calc. 20 + 30))
83+
84+
Get Results, last to first:
85+
((r.var._1))
86+
((r.var._2))
87+
((r.var._3))
88+
</pre>
89+
</div>
90+
</div>
91+
<script src="reacto.js"></script>
92+
<script>
93+
(function(){
94+
95+
document.getElementById('btn-convert').addEventListener('click', function(){
96+
const rText = document.getElementById('input-rtext').value;
97+
// document.getElementById('output-text').value = rto.process(rText)
98+
document.getElementById('output-text').innerText = rto.process(rText)
99+
})
100+
101+
})()
102+
</script>
103+
</body>
104+
</html>

dist/reacto.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/style.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.main-container {
2+
margin-top: 30px;
3+
}
4+
.monofont {
5+
font-family: 'Courier New', monospace;
6+
}
7+
#output-text {
8+
border: 1px solid #ccc;
9+
padding: 7px 15px;
10+
border-radius: 4px;
11+
min-height: 230px;
12+
}

dist/transpiled-ts-js/index.js

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/transpiled-ts-js/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/transpiled-ts-js/modules/interpreters/blocks.js

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)