ba63 1.0.0 โ 1.0.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 +81 -8
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,15 +1,88 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BA63 ๐บ
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<table style="center; width: 100%;">
|
|
4
|
+
<tr>
|
|
5
|
+
<td>
|
|
6
|
+
<p style="text-align: center;">
|
|
7
|
+
<img src="./assets/demo.png" alt="Successfully running `BA63.testRender()`" width="320"/>
|
|
8
|
+
</p>
|
|
9
|
+
</td>
|
|
10
|
+
</tr>
|
|
11
|
+
<tr>
|
|
12
|
+
<td style="text-align: center;">
|
|
13
|
+
<p style="text-align: center;">
|
|
14
|
+
<code>ba63</code> is a very lightweight library that allows for simple interaction with any Wincor Nixdorf BA63 USB VFD.
|
|
15
|
+
</p>
|
|
16
|
+
</td>
|
|
17
|
+
</tr>
|
|
18
|
+
</table>
|
|
4
19
|
|
|
5
|
-
|
|
6
|
-
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
<table align="center">
|
|
23
|
+
<tr>
|
|
24
|
+
<td>
|
|
25
|
+
๐ฅ Bun:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
bun add ba63
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
<td>
|
|
32
|
+
๐ฆ npm:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install ba63
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<td>
|
|
39
|
+
๐งถ Yarn:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
yarn add ba63
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
</td>
|
|
46
|
+
</tr>
|
|
47
|
+
</table>
|
|
48
|
+
|
|
49
|
+
## Getting started
|
|
50
|
+
|
|
51
|
+
Getting started with `ba63` is as easy as:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { BA63 } from "ba63";
|
|
55
|
+
|
|
56
|
+
const ba63 = await BA63.create();
|
|
57
|
+
|
|
58
|
+
await ba63.testRender();
|
|
7
59
|
```
|
|
8
60
|
|
|
9
|
-
|
|
61
|
+
Now we can enhance this script with the ability to clear the screen after a few seconds or on process interrupt:
|
|
10
62
|
|
|
11
|
-
```
|
|
12
|
-
|
|
63
|
+
```typescript
|
|
64
|
+
import { BA63 } from "ba63";
|
|
65
|
+
|
|
66
|
+
const ba63 = await BA63.create();
|
|
67
|
+
|
|
68
|
+
await ba63.testRender();
|
|
69
|
+
|
|
70
|
+
async function exit() {
|
|
71
|
+
await ba63.clearDisplay();
|
|
72
|
+
process.exit(0);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
setTimeout(async () => {
|
|
76
|
+
await exit();
|
|
77
|
+
}, 7000);
|
|
78
|
+
|
|
79
|
+
process.on("SIGINT", async () => {
|
|
80
|
+
await exit();
|
|
81
|
+
});
|
|
13
82
|
```
|
|
14
83
|
|
|
15
|
-
|
|
84
|
+
Alternatively, you can pull down this repo and run the demo yourself:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bun install && bun demo
|
|
88
|
+
```
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ba63",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Caleb Perry",
|
|
6
6
|
"url": "https://github.com/foxtrotperry",
|
|
7
7
|
"email": "caleb@foxtrotperry.com"
|
|
8
8
|
},
|
|
9
|
+
"repository": "github.com/foxtrotperry/ba63",
|
|
9
10
|
"type": "module",
|
|
10
11
|
"files": [
|
|
11
12
|
"dist"
|
|
@@ -21,8 +22,9 @@
|
|
|
21
22
|
"scripts": {
|
|
22
23
|
"build:js": "bun run build.ts",
|
|
23
24
|
"build:types": "tsc",
|
|
24
|
-
"build": "bun run build:js && bun run build:types",
|
|
25
|
+
"build": "rm -rf ./dist && bun run build:js && bun run build:types",
|
|
25
26
|
"package": "rm -rf ./dist && bun run build && bun pm pack",
|
|
27
|
+
"prepare": "bun run build",
|
|
26
28
|
"test": "bun test"
|
|
27
29
|
},
|
|
28
30
|
"keywords": [
|