create-cubing-app 0.61.0 → 0.61.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 +8 -2
- package/app-template/package-lock.json +37 -89
- package/app-template/package.json +1 -1
- package/app-template/script/build.js +1 -1
- package/app-template/src/main.ts +2 -2
- package/bin/create-cubing-app.js +4 -19
- package/package.json +18 -10
package/README.md
CHANGED
|
@@ -15,6 +15,10 @@ cd my-cubing-project
|
|
|
15
15
|
npm run dev
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
Open <http://localhost:1234/>, and you should see a `<twisty-player>` with a scramble:
|
|
19
|
+
|
|
20
|
+
<img width="480" src="./img/screenshot.avif" alt="Screenshot showing a <twisty-player> and a scramble.">
|
|
21
|
+
|
|
18
22
|
### Windows
|
|
19
23
|
|
|
20
24
|
We recommend using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on Windows.
|
|
@@ -25,9 +29,9 @@ We recommend using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)
|
|
|
25
29
|
npm run build
|
|
26
30
|
```
|
|
27
31
|
|
|
28
|
-
The site will be built to the
|
|
32
|
+
The site will be built to the `./dist/web/` folder, ready to place onto any static web server.
|
|
29
33
|
|
|
30
|
-
(Note: the output uses module scripts, which means you can't just open the output HTML files directly in the browser. You have to use a web server. If you want to test the output of `npm run build` locally on your computer, you can run: `npx http-server ./dist/web
|
|
34
|
+
(Note: the output uses module scripts, which means you can't just open the output HTML files directly in the browser. You have to use a web server. If you want to test the output of `npm run build` locally on your computer, you can run: `npx http-server ./dist/web/`)
|
|
31
35
|
|
|
32
36
|
## Getting the latest version of `cubing.js`
|
|
33
37
|
|
|
@@ -36,6 +40,8 @@ See <https://github.com/cubing/cubing.js/releases> for information on the latest
|
|
|
36
40
|
```shell
|
|
37
41
|
# Check what version of `cubing.js` you have
|
|
38
42
|
npm list cubing
|
|
43
|
+
# Check for the latest version
|
|
44
|
+
npm show cubing version
|
|
39
45
|
|
|
40
46
|
# Update to the latest
|
|
41
47
|
npm install --save cubing@latest
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"packages": {
|
|
6
6
|
"": {
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"cubing": "^0.61.
|
|
8
|
+
"cubing": "^0.61.3"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"barely-a-dev-server": "^0.8.0"
|
|
@@ -445,6 +445,37 @@
|
|
|
445
445
|
"node": ">=18"
|
|
446
446
|
}
|
|
447
447
|
},
|
|
448
|
+
"node_modules/@optique/core": {
|
|
449
|
+
"version": "0.9.0-dev.187",
|
|
450
|
+
"resolved": "https://registry.npmjs.org/@optique/core/-/core-0.9.0-dev.187.tgz",
|
|
451
|
+
"integrity": "sha512-wBTFbWaESwRTjF+429xzFueIBcsJ/xaD66pSwhJaIo1f7vljRfXa51R0H+EyY2tkNeFsM68YFcPPXw8TLtRuZw==",
|
|
452
|
+
"funding": [
|
|
453
|
+
"https://github.com/sponsors/dahlia"
|
|
454
|
+
],
|
|
455
|
+
"license": "MIT",
|
|
456
|
+
"engines": {
|
|
457
|
+
"bun": ">=1.2.0",
|
|
458
|
+
"deno": ">=2.3.0",
|
|
459
|
+
"node": ">=20.0.0"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"node_modules/@optique/run": {
|
|
463
|
+
"version": "0.9.0-dev.187",
|
|
464
|
+
"resolved": "https://registry.npmjs.org/@optique/run/-/run-0.9.0-dev.187.tgz",
|
|
465
|
+
"integrity": "sha512-JBV2icMvuoc/3W6/LxcGyRv93PCvLW0KsRtKXGz4xcEMgD08hPMuKM+xBQR4+waHUjq9cofyqst854lFx4ud5A==",
|
|
466
|
+
"funding": [
|
|
467
|
+
"https://github.com/sponsors/dahlia"
|
|
468
|
+
],
|
|
469
|
+
"license": "MIT",
|
|
470
|
+
"dependencies": {
|
|
471
|
+
"@optique/core": "0.9.0-dev.187+992128e2"
|
|
472
|
+
},
|
|
473
|
+
"engines": {
|
|
474
|
+
"bun": ">=1.2.0",
|
|
475
|
+
"deno": ">=2.3.0",
|
|
476
|
+
"node": ">=20.0.0"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
448
479
|
"node_modules/@tweenjs/tween.js": {
|
|
449
480
|
"version": "23.1.3",
|
|
450
481
|
"resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",
|
|
@@ -488,18 +519,6 @@
|
|
|
488
519
|
"integrity": "sha512-e3zmDEPih4Rle+JrP5cT8nCCtDizoUpEaN72OuD1clbhXGERtn0wwuMdxOrBymu3kMLWKDd8hd+ERhSheLuLTg==",
|
|
489
520
|
"license": "BSD-3-Clause"
|
|
490
521
|
},
|
|
491
|
-
"node_modules/ansi-regex": {
|
|
492
|
-
"version": "6.1.0",
|
|
493
|
-
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
|
|
494
|
-
"integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
|
|
495
|
-
"license": "MIT",
|
|
496
|
-
"engines": {
|
|
497
|
-
"node": ">=12"
|
|
498
|
-
},
|
|
499
|
-
"funding": {
|
|
500
|
-
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
522
|
"node_modules/barely-a-dev-server": {
|
|
504
523
|
"version": "0.8.0",
|
|
505
524
|
"resolved": "https://registry.npmjs.org/barely-a-dev-server/-/barely-a-dev-server-0.8.0.tgz",
|
|
@@ -517,48 +536,21 @@
|
|
|
517
536
|
"esbuild": "^0.25.0"
|
|
518
537
|
}
|
|
519
538
|
},
|
|
520
|
-
"node_modules/chalk": {
|
|
521
|
-
"version": "5.3.0",
|
|
522
|
-
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
|
|
523
|
-
"integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
|
|
524
|
-
"license": "MIT",
|
|
525
|
-
"engines": {
|
|
526
|
-
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
|
527
|
-
},
|
|
528
|
-
"funding": {
|
|
529
|
-
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
"node_modules/cmd-ts-too": {
|
|
533
|
-
"version": "0.15.3",
|
|
534
|
-
"resolved": "https://registry.npmjs.org/cmd-ts-too/-/cmd-ts-too-0.15.3.tgz",
|
|
535
|
-
"integrity": "sha512-B16GQEn0fENaOfFXxJRJDecYjDxs8Mcm2cU4jhMwxl+fbgTnLjoD+dIw/yTdMDDNQssgoDqbiTSCKcXTitisvA==",
|
|
536
|
-
"license": "MIT",
|
|
537
|
-
"dependencies": {
|
|
538
|
-
"chalk": "^5.3.0",
|
|
539
|
-
"debug": "^4.3.7",
|
|
540
|
-
"didyoumean": "^1.2.2",
|
|
541
|
-
"strip-ansi": "^7.1.0"
|
|
542
|
-
},
|
|
543
|
-
"engines": {
|
|
544
|
-
"bun": ">=1.0.30",
|
|
545
|
-
"node": ">=16.0.0"
|
|
546
|
-
}
|
|
547
|
-
},
|
|
548
539
|
"node_modules/comlink": {
|
|
549
540
|
"version": "4.4.1",
|
|
550
541
|
"resolved": "https://registry.npmjs.org/comlink/-/comlink-4.4.1.tgz",
|
|
551
542
|
"integrity": "sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q=="
|
|
552
543
|
},
|
|
553
544
|
"node_modules/cubing": {
|
|
554
|
-
"version": "0.61.
|
|
555
|
-
"resolved": "https://registry.npmjs.org/cubing/-/cubing-0.61.
|
|
556
|
-
"integrity": "sha512-
|
|
545
|
+
"version": "0.61.3",
|
|
546
|
+
"resolved": "https://registry.npmjs.org/cubing/-/cubing-0.61.3.tgz",
|
|
547
|
+
"integrity": "sha512-5ZZDrMjYmKAjfbeorHtaH0kj/89K0i2FYByYxLfCs2tb5Rx5ChUK/gtQfRSjPRyqAnBiVG6TPr/pGR1GvjMEng==",
|
|
557
548
|
"license": "MPL-2.0 OR GPL-3.0-or-later",
|
|
558
549
|
"dependencies": {
|
|
550
|
+
"@optique/core": "v0.9.0-dev.187",
|
|
551
|
+
"@optique/run": "v0.9.0-dev.187",
|
|
559
552
|
"@types/three": "^0.169.0",
|
|
560
553
|
"@types/web-bluetooth": "^0.0.20",
|
|
561
|
-
"cmd-ts-too": "^0.15.3",
|
|
562
554
|
"comlink": "^4.4.1",
|
|
563
555
|
"random-uint-below": "v3.3.0",
|
|
564
556
|
"three": "^0.170.0",
|
|
@@ -572,29 +564,6 @@
|
|
|
572
564
|
"node": ">=22.3.0"
|
|
573
565
|
}
|
|
574
566
|
},
|
|
575
|
-
"node_modules/debug": {
|
|
576
|
-
"version": "4.3.7",
|
|
577
|
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
|
578
|
-
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
|
579
|
-
"license": "MIT",
|
|
580
|
-
"dependencies": {
|
|
581
|
-
"ms": "^2.1.3"
|
|
582
|
-
},
|
|
583
|
-
"engines": {
|
|
584
|
-
"node": ">=6.0"
|
|
585
|
-
},
|
|
586
|
-
"peerDependenciesMeta": {
|
|
587
|
-
"supports-color": {
|
|
588
|
-
"optional": true
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
},
|
|
592
|
-
"node_modules/didyoumean": {
|
|
593
|
-
"version": "1.2.2",
|
|
594
|
-
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
|
595
|
-
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
|
|
596
|
-
"license": "Apache-2.0"
|
|
597
|
-
},
|
|
598
567
|
"node_modules/esbuild": {
|
|
599
568
|
"version": "0.25.4",
|
|
600
569
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz",
|
|
@@ -649,12 +618,6 @@
|
|
|
649
618
|
"integrity": "sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw==",
|
|
650
619
|
"license": "MIT"
|
|
651
620
|
},
|
|
652
|
-
"node_modules/ms": {
|
|
653
|
-
"version": "2.1.3",
|
|
654
|
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
655
|
-
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
|
656
|
-
"license": "MIT"
|
|
657
|
-
},
|
|
658
621
|
"node_modules/random-uint-below": {
|
|
659
622
|
"version": "3.3.0",
|
|
660
623
|
"resolved": "https://registry.npmjs.org/random-uint-below/-/random-uint-below-3.3.0.tgz",
|
|
@@ -663,21 +626,6 @@
|
|
|
663
626
|
"node": ">=19"
|
|
664
627
|
}
|
|
665
628
|
},
|
|
666
|
-
"node_modules/strip-ansi": {
|
|
667
|
-
"version": "7.1.0",
|
|
668
|
-
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
|
669
|
-
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
|
670
|
-
"license": "MIT",
|
|
671
|
-
"dependencies": {
|
|
672
|
-
"ansi-regex": "^6.0.1"
|
|
673
|
-
},
|
|
674
|
-
"engines": {
|
|
675
|
-
"node": ">=12"
|
|
676
|
-
},
|
|
677
|
-
"funding": {
|
|
678
|
-
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
629
|
"node_modules/tagged-tag": {
|
|
682
630
|
"version": "1.0.0",
|
|
683
631
|
"resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz",
|
package/app-template/src/main.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Always keep the following line if you are using any twisty players on your page.
|
|
2
2
|
import "cubing/twisty";
|
|
3
|
-
// Use the following line for specific imports from `cubing/twisty`.
|
|
4
|
-
import { TwistyAlgViewer, type TwistyPlayer } from "cubing/twisty";
|
|
5
3
|
|
|
6
4
|
// Import from other modules as usual.
|
|
7
5
|
import { randomScrambleForEvent } from "cubing/scramble";
|
|
6
|
+
// Use the following line for specific imports from `cubing/twisty`.
|
|
7
|
+
import { TwistyAlgViewer, type TwistyPlayer } from "cubing/twisty";
|
|
8
8
|
|
|
9
9
|
class App {
|
|
10
10
|
// Example of getting an element from the page.
|
package/bin/create-cubing-app.js
CHANGED
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
#!/usr/bin/env node --
|
|
1
|
+
#!/usr/bin/env -S node --
|
|
2
2
|
|
|
3
3
|
import { exec } from "node:child_process";
|
|
4
4
|
import { exists } from "node:fs";
|
|
5
|
-
import { cp, mkdir
|
|
6
|
-
import {
|
|
7
|
-
import { exit, stderr } from "node:process";
|
|
5
|
+
import { cp, mkdir } from "node:fs/promises";
|
|
6
|
+
import { exit } from "node:process";
|
|
8
7
|
import { createInterface } from "node:readline";
|
|
9
8
|
import { fileURLToPath } from "node:url";
|
|
10
9
|
import { promisify } from "node:util";
|
|
11
10
|
|
|
12
|
-
const CREATE_CUBING_APP_PACKAGE_JSON = JSON.parse(
|
|
13
|
-
await readFile(new URL("../package.json", import.meta.url), "utf-8"),
|
|
14
|
-
);
|
|
15
|
-
|
|
16
11
|
const execPromise = promisify(exec);
|
|
17
12
|
|
|
18
|
-
function printHelpAndExit() {
|
|
19
|
-
stderr.write(`Usage:
|
|
20
|
-
|
|
21
|
-
npm create cubing-app <project folder name>
|
|
22
|
-
|
|
23
|
-
The project folder name should consist of only letters, numbers, dashes, and underscores.
|
|
24
|
-
`);
|
|
25
|
-
exit(1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
13
|
let projectPath = process.argv[2];
|
|
29
14
|
if (!projectPath) {
|
|
30
15
|
const readline = createInterface({
|
|
@@ -80,7 +65,7 @@ await execPromise("npm install", {
|
|
|
80
65
|
console.log(`Your cubing app has been created.
|
|
81
66
|
To work on it, run:
|
|
82
67
|
|
|
83
|
-
cd
|
|
68
|
+
cd "${projectPath.replaceAll('"', '\\"')}"
|
|
84
69
|
npm run dev
|
|
85
70
|
|
|
86
71
|
Edit the files in \`src\` and open the displayed URL in browser to see changes.
|
package/package.json
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cubing-app",
|
|
3
|
-
"version": "0.61.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.61.3",
|
|
4
|
+
"description": "Create an app using `cubing.js` (https://js.cubing.net/).",
|
|
5
|
+
"author": "The js.cubing.net team",
|
|
6
|
+
"license": "MPL-2.0 OR GPL-3.0-or-later",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cubing/create-cubing-app.git"
|
|
7
10
|
},
|
|
8
11
|
"engines": {
|
|
9
12
|
"node": ">=19"
|
|
10
13
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
14
|
+
"type": "module",
|
|
15
|
+
"bin": {
|
|
16
|
+
"create-cubing-app": "bin/create-cubing-app.js"
|
|
13
17
|
},
|
|
14
18
|
"devDependencies": {
|
|
15
|
-
"@biomejs/biome": "
|
|
16
|
-
"@cubing/dev-config": "^0.
|
|
17
|
-
"@types/bun": "^1.
|
|
19
|
+
"@biomejs/biome": "2.3.9",
|
|
20
|
+
"@cubing/dev-config": "^0.6.6",
|
|
21
|
+
"@types/bun": "^1.3.5",
|
|
18
22
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
23
|
+
"bun-dx": "^0.1.4",
|
|
19
24
|
"validate-npm-package-name": "^5.0.0"
|
|
20
25
|
},
|
|
21
26
|
"files": [
|
|
22
27
|
"./app-template",
|
|
23
28
|
"./bin"
|
|
24
|
-
]
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"prepublishOnly": "make prepublishOnly"
|
|
32
|
+
}
|
|
25
33
|
}
|