create-cubing-app 0.60.0 → 0.61.0-b
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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"packages": {
|
|
6
6
|
"": {
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"cubing": "^0.
|
|
8
|
+
"cubing": "^0.61.0"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"barely-a-dev-server": "^0.8.0"
|
|
@@ -551,9 +551,9 @@
|
|
|
551
551
|
"integrity": "sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q=="
|
|
552
552
|
},
|
|
553
553
|
"node_modules/cubing": {
|
|
554
|
-
"version": "0.
|
|
555
|
-
"resolved": "https://registry.npmjs.org/cubing/-/cubing-0.
|
|
556
|
-
"integrity": "sha512-
|
|
554
|
+
"version": "0.61.0",
|
|
555
|
+
"resolved": "https://registry.npmjs.org/cubing/-/cubing-0.61.0.tgz",
|
|
556
|
+
"integrity": "sha512-bAifBUV9VvQlzaO3HbsDt61nksemq9ygXuR3ZhAmPjGeEU0B53uOslIFqs1BYszLTqJaBQrGlPVHGkXNacedmA==",
|
|
557
557
|
"license": "MPL-2.0 OR GPL-3.0-or-later",
|
|
558
558
|
"dependencies": {
|
|
559
559
|
"@types/three": "^0.169.0",
|
|
@@ -602,6 +602,7 @@
|
|
|
602
602
|
"dev": true,
|
|
603
603
|
"hasInstallScript": true,
|
|
604
604
|
"license": "MIT",
|
|
605
|
+
"peer": true,
|
|
605
606
|
"bin": {
|
|
606
607
|
"esbuild": "bin/esbuild"
|
|
607
608
|
},
|
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
|
@@ -2,29 +2,14 @@
|
|
|
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,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cubing-app",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.61.0-b",
|
|
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.10",
|
|
20
|
+
"@cubing/dev-config": "^0.6.6",
|
|
21
|
+
"@types/bun": "^1.3.5",
|
|
18
22
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
19
23
|
"validate-npm-package-name": "^5.0.0"
|
|
20
24
|
},
|
|
21
25
|
"files": [
|
|
22
26
|
"./app-template",
|
|
23
27
|
"./bin"
|
|
24
|
-
]
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"prepublishOnly": "make prepublishOnly"
|
|
31
|
+
}
|
|
25
32
|
}
|