cm-chess 3.1.1 → 3.2.0
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/package.json +2 -2
- package/src/Chess.js +3 -3
- package/test/TestChess.js +1 -1
- package/test/index.html +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cm-chess",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "It's like chess.js, but in ES6 and can handle variations (tree-structured move history)",
|
|
5
5
|
"main": "./src/Chess.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://github.com/shaack/cm-chess#readme",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"chess.mjs": "^1.4.0",
|
|
28
|
-
"cm-pgn": "3.1
|
|
28
|
+
"cm-pgn": "3.2.1",
|
|
29
29
|
"import-node-modules": "^1.0.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/Chess.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Repository: https://github.com/shaack/cm-chess
|
|
4
4
|
* License: MIT, see file 'LICENSE'
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import {Pgn} from "cm-pgn/src/Pgn.js"
|
|
7
|
+
import {TAGS} from "cm-pgn/src/Header.js"
|
|
8
|
+
import {Chess as ChessJs, SQUARES} from "chess.mjs/src/Chess.js"
|
|
9
9
|
|
|
10
10
|
export const PIECES = {
|
|
11
11
|
p: {name: "pawn", value: 1},
|
package/test/TestChess.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author Stefan Haack (https://shaack.com)
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import {TAGS} from "cm-pgn/src/Header.js"
|
|
5
5
|
import {describe, it, assert} from "../node_modules/teevi/src/teevi.js"
|
|
6
6
|
import {Chess, COLOR, FEN} from "../src/Chess.js"
|
|
7
7
|
|
package/test/index.html
CHANGED
|
@@ -4,9 +4,19 @@
|
|
|
4
4
|
<title>cm-chess tests</title>
|
|
5
5
|
</head>
|
|
6
6
|
<body>
|
|
7
|
-
<script
|
|
7
|
+
<script src="https://cdn.jsdelivr.net/npm/es-module-shims@1.7.2/dist/es-module-shims.min.js"></script>
|
|
8
|
+
<script type="importmap">
|
|
9
|
+
{
|
|
10
|
+
"imports": {
|
|
11
|
+
"teevi/": "../node_modules/teevi/",
|
|
12
|
+
"cm-pgn/": "../node_modules/cm-pgn/",
|
|
13
|
+
"chess.mjs/": "../node_modules/chess.mjs/"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
</script>
|
|
8
18
|
<script type="module">
|
|
9
|
-
import {teevi} from "
|
|
19
|
+
import {teevi} from "teevi/src/teevi.js"
|
|
10
20
|
import "./TestChess.js"
|
|
11
21
|
import "./TestFen.js"
|
|
12
22
|
teevi.run()
|