@freik/pedroviz 0.1.3 → 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 +51 -19
- package/dist/entry.js +172 -0
- package/dist/frontend.js +156 -0
- package/dist/frontend.js.map +7 -0
- package/dist/index.html +4 -3
- package/dist/styles.css +115 -0
- package/package.json +19 -17
- package/dist/index-1wdsy1g5.css +0 -1
- package/dist/index-fh6bm18e.js +0 -134
- package/dist/main.js +0 -156
- /package/dist/{logo-nspswy0y.png → logo.png} +0 -0
package/README.md
CHANGED
|
@@ -18,12 +18,15 @@
|
|
|
18
18
|
- use `cd <folder location>` to get to where you put your source code.
|
|
19
19
|
2. Type `bunx @freik/pedroviz`.
|
|
20
20
|
3. Or:
|
|
21
|
-
1. Open up a command line
|
|
22
|
-
2. type `bunx @freik/pedroviz
|
|
21
|
+
1. Open up a command line inside Android Studio
|
|
22
|
+
2. type `bunx @freik/pedroviz` (because Android Studio puts you in the right
|
|
23
|
+
directory automagically)
|
|
23
24
|
4. Advanced folks (who might use Bun for other things as well):
|
|
24
25
|
1. Add it to your `package.json` dependency list: `bun add @freik/pedroviz`
|
|
25
26
|
2. Make a script to call `pedroviz`. If the `package.json` file isn't in your
|
|
26
27
|
source repo root, add the location of your source as the second command.
|
|
28
|
+
Something like this: `"pedro": "bun run pedroviz"` and then you can call
|
|
29
|
+
it by typeing `bun pedro` if you'd prefer!
|
|
27
30
|
|
|
28
31
|
The first time you use the app, it will take some time to download & install the
|
|
29
32
|
package. Once it's been installed, you no longer need to be connected to the
|
|
@@ -136,6 +139,18 @@ of my frei time, because I love working with FTC students...)
|
|
|
136
139
|
|
|
137
140
|
# Development
|
|
138
141
|
|
|
142
|
+
This whole thing is built with [Typescript](https://www.typescriptlang.org/).
|
|
143
|
+
I'm using [Hono](https://hono.dev/) as a local web server,
|
|
144
|
+
[React](https://react.dev/) with [Jotai](https://jotai.org/) for state
|
|
145
|
+
management and [FluentUI](https://developer.microsoft.com/en-us/fluentui#/) as
|
|
146
|
+
the UI/control toolbox. None of these framworks are too complicated to get
|
|
147
|
+
started with, but each have their own sets of weirdness. Feel free to reach out
|
|
148
|
+
to me if you're trying to understand the code, add a feature, or fix a bug.
|
|
149
|
+
|
|
150
|
+
The back end code is all served through `src/entry.ts` which serves up the
|
|
151
|
+
.ts/.tsx files from the `src/client` subdirectory, and runs the stuff in the
|
|
152
|
+
`src/server` subdirectory on the backend.
|
|
153
|
+
|
|
139
154
|
To install dependencies:
|
|
140
155
|
|
|
141
156
|
```bash
|
|
@@ -144,7 +159,7 @@ bun install
|
|
|
144
159
|
|
|
145
160
|
To start a development server:
|
|
146
161
|
|
|
147
|
-
```
|
|
162
|
+
```bash
|
|
148
163
|
bun dev {FTC Source Location}
|
|
149
164
|
```
|
|
150
165
|
|
|
@@ -152,22 +167,39 @@ To bundle for production (only for Kevin, sorry):
|
|
|
152
167
|
|
|
153
168
|
```bash
|
|
154
169
|
bun bundle
|
|
170
|
+
bun npm login
|
|
155
171
|
bun publish --access=public
|
|
156
172
|
```
|
|
157
173
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
### Buy, why????
|
|
175
|
+
|
|
176
|
+
Why did I build it this way, instead of using Java? Because I didn't want to
|
|
177
|
+
learn a new UI toolkit. I've been using React for a very, very long time. It's
|
|
178
|
+
cross-platform, and functional (in the mathematical/programming sense of the
|
|
179
|
+
word). Typescript is just flat out better than Javascript (fight me...), and I
|
|
180
|
+
switched to using [Recoil](https://github.com/facebookexperimental/Recoil) when
|
|
181
|
+
one of the engineers I supported while working at Facebook built in back in 2020
|
|
182
|
+
because I really hated all the boilerplate in Redux. Recoil is dead, but Jotai
|
|
183
|
+
was a public reimplementation that's still actively supported.
|
|
184
|
+
|
|
185
|
+
While a Microsoft employee, I had learned WinForms and WPF way way way back in
|
|
186
|
+
the day, but the various MVC/MVVM data-binding shenanigans just slowly sapped my
|
|
187
|
+
will to build UI's. Writing UI as functional, composable components makes my
|
|
188
|
+
brain so much happier than MVC or MVVM or any sort of forced "this is the UI,
|
|
189
|
+
and that's the dota model" kind a crap.
|
|
190
|
+
|
|
191
|
+
I also have no interest in learning a different UI framework, particularly
|
|
192
|
+
something that's not going to be available everywhere I care about (Java on an
|
|
193
|
+
iPhone is not really a thing). So, it's TypeScript, and React. (I actually built
|
|
194
|
+
[a little C++ app framework](https://github.com/kevinfrei/cuark) that lets me
|
|
195
|
+
write much bigger, more complex things that use React + Typescript for the UI
|
|
196
|
+
across Linux, macOS, and Windows, and it's _not_ React Native).
|
|
197
|
+
|
|
198
|
+
Just know that I'm a grumpy old programmer who retired before Claude Code stole
|
|
199
|
+
the joy of coding if you're willing to pay $500/month to light the planet on
|
|
200
|
+
fire. I love to write code. I _can_ code review (that's my primary role as a
|
|
201
|
+
mentor on FTC) but honestly, asking some miserable AI to create code when I'd
|
|
202
|
+
prefer to do it myself, and then have to code review that miserable AI's code
|
|
203
|
+
is...well, miserable. There's no joy to be had in helping the techno-fascists
|
|
204
|
+
pillage and destroy the planet, while **also** killing jobs that humans are
|
|
205
|
+
pretty good at, and that I actually happen to really enjoy.
|