@logic-pad/core 0.1.2 → 0.1.3
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
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
# @logic-pad/core
|
|
2
2
|
|
|
3
|
-
The core API of Logic Pad.
|
|
3
|
+
The core API of Logic Pad.
|
|
4
4
|
|
|
5
5
|
## Developing Logic Core
|
|
6
6
|
|
|
7
|
-
[Bun >=v1.1.0](https://bun.sh/) is required for this
|
|
7
|
+
This package is part of Logic Pad. [Bun >=v1.1.0](https://bun.sh/) is required for this package.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
# 1. Clone this repository
|
|
11
|
-
git clone https://github.com/hlysine/logic-
|
|
11
|
+
git clone https://github.com/hlysine/logic-pad.git
|
|
12
12
|
|
|
13
13
|
# 2. Restore dependencies
|
|
14
|
-
cd logic-
|
|
14
|
+
cd logic-pad
|
|
15
|
+
bun install
|
|
16
|
+
cd packages/logic-core
|
|
15
17
|
bun install
|
|
16
18
|
|
|
17
19
|
# 3. Build the library
|
|
18
20
|
bun build
|
|
19
21
|
```
|
|
22
|
+
|
|
23
|
+
To test your changes in realtime in Logic Pad, simply run Logic Pad using the Vite dev server.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# In the logic-pad directory
|
|
27
|
+
bun run dev
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Note that Logic Pad bundles the `src` directory of this package directly with Vite instead of using the transpiled
|
|
31
|
+
code in the `dist` output folder, which is for publishing only.
|
|
@@ -34,7 +34,7 @@ class BacktrackSolver extends Solver {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
async *solve(grid) {
|
|
37
|
-
const worker = new Worker(new URL(
|
|
37
|
+
const worker = new Worker(new URL(`./backtrackWorker.js`, import.meta.url), {
|
|
38
38
|
type: 'module',
|
|
39
39
|
});
|
|
40
40
|
try {
|
package/package.json
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logic-pad/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"assets"
|
|
8
8
|
],
|
|
9
|
+
"homepage": "https://github.com/hlysine/logic-pad",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/hlysine/logic-pad.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"logic",
|
|
16
|
+
"puzzle",
|
|
17
|
+
"game",
|
|
18
|
+
"solver",
|
|
19
|
+
"logic-pad",
|
|
20
|
+
"grid"
|
|
21
|
+
],
|
|
22
|
+
"license": "AGPL-3.0-only",
|
|
9
23
|
"main": "./dist/logic-core.umd.cjs",
|
|
10
24
|
"module": "./dist/logic-core.js",
|
|
11
25
|
"exports": {
|