cm-chess 2.5.3 → 3.0.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/README.md +1 -1
- package/package.json +6 -6
- package/src/{cm-chess/Chess.js → Chess.js} +3 -3
- package/test/TestChess.js +5 -4
- package/test/TestFen.js +1 -1
- package/test/index.html +2 -1
- package/postinstall.cjs +0 -9
- /package/src/{cm-chess/Fen.js → Fen.js} +0 -0
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ PGN header values, Nags and Comments.
|
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
20
|
-
For documentation, see the jsdoc annotations in [Chess.js](https://github.com/shaack/cm-chess/blob/master/src/
|
|
20
|
+
For documentation, see the jsdoc annotations in [Chess.js](https://github.com/shaack/cm-chess/blob/master/src/Chess.js).
|
|
21
21
|
|
|
22
22
|
cm-chess uses [cm-pgn](https://github.com/shaack/cm-pgn) for the
|
|
23
23
|
header and history, therefore you have also the full API of **cm-pgn**.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cm-chess",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "It's like chess.js, but in ES6 and can handle variations (tree-structured move history)",
|
|
5
|
-
"main": "./src/
|
|
5
|
+
"main": "./src/Chess.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
8
|
+
"test": "echo request test/index.html in a browser for testing"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/shaack/cm-chess#readme",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"chess.mjs": "^1.
|
|
28
|
-
"cm-pgn": "
|
|
29
|
-
"
|
|
27
|
+
"chess.mjs": "^1.4.0",
|
|
28
|
+
"cm-pgn": "3.1.0",
|
|
29
|
+
"import-node-module": "^1.0.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"teevi": "^2.2.4"
|
|
@@ -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
|
+
const {Pgn} = await importNodeModule("/cm-pgn/src/Pgn.js")
|
|
7
|
+
const {TAGS} = await importNodeModule("/cm-pgn/src/Header.js")
|
|
8
|
+
const {Chess: ChessJs, SQUARES} = await importNodeModule("/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,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author Stefan Haack (https://shaack.com)
|
|
3
|
+
*/
|
|
4
|
+
const {TAGS} = await importNodeModule("cm-pgn/src/Header.js")
|
|
5
|
+
import {Chess, COLOR, FEN} from "../src/Chess.js"
|
|
3
6
|
import {describe, it, assert} from "../node_modules/teevi/src/teevi.js"
|
|
4
7
|
|
|
5
|
-
// TODO create a test, which demonstrates all features, including variations
|
|
6
|
-
|
|
7
8
|
describe("Chess", function () {
|
|
8
9
|
|
|
9
10
|
it("should create empty Chess", () => {
|
package/test/TestFen.js
CHANGED
package/test/index.html
CHANGED
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
<body>
|
|
7
7
|
<script type="module">
|
|
8
8
|
import {teevi} from "../node_modules/teevi/src/teevi.js"
|
|
9
|
+
import "../node_modules/import-node-module/import-node-module.js"
|
|
9
10
|
import "./TestChess.js"
|
|
10
11
|
import "./TestFen.js"
|
|
11
12
|
teevi.run()
|
|
12
13
|
</script>
|
|
13
14
|
</body>
|
|
14
|
-
</html>
|
|
15
|
+
</html>
|
package/postinstall.cjs
DELETED
|
File without changes
|