chess.js icon indicating copy to clipboard operation
chess.js copied to clipboard

Can I use this library in deno? If so, how would I go about it?

Open Hugos68 opened this issue 2 years ago • 2 comments

I'm building a chess application using chessjs on the client and need the same logic on my serverless function, the serverless function is running deno and i still want to use this package, is this possible?

Hugos68 avatar Feb 15 '23 13:02 Hugos68

Good question @Hugos68. I don't have any experience with any of the new JS runtimes (deno and bun). Maybe you can give this a try and report your findings?

jhlywa avatar Feb 18 '23 15:02 jhlywa

Good question @Hugos68. I don't have any experience with any of the new JS runtimes (deno and bun). Maybe you can give this a try and report your findings?

Alright, so I've successfully used this library with Deno. I used import { Chess } from "https://esm.sh/[email protected]"; to test it and it works fine. One thing I noticed while testing was that when exporting to Pgn between the last header and * there wasn't a new line. This caused the reading of the export pgn to fail which seems rather strange to me. Not sure if this is related to the beta version or not. Besides the parsing I have yet to notice any problems running Chessjs on deno, thanks for this amazing library!

Hugos68 avatar Feb 20 '23 21:02 Hugos68