Coder Social home page Coder Social logo

lichess-org / chessground-examples Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 33.0 5.32 MB

Usage examples for chessground

Home Page: https://lichess.org

License: GNU General Public License v3.0

CSS 19.48% HTML 2.62% TypeScript 73.37% JavaScript 4.53%

chessground-examples's People

Contributors

dependabot[bot] avatar hi-ogawa avatar isaacl avatar niklasf avatar ornicar avatar pnodet avatar valera-rozuvan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chessground-examples's Issues

Not able to compile

$ gulp dev # or ./node_modules/.bin/gulp dev
gulp dev[54766]: ../src/node_contextify.cc:627:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
 1: 0x10003afe5 node::Abort() [/Users/f0c1s/.nvm/versions/node/v11.1.0/bin/node]
 2: 0x10003a01f node::AddEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [/Users/f0c1s/.nvm/versions/node/v11.1.0/bin/node]
 3: 0x10005f7b9 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/f0c1s/.nvm/versions/node/v11.1.0/bin/node]
 4: 0x100225127 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/Users/f0c1s/.nvm/versions/node/v11.1.0/bin/node]
 5: 0x1002243e8 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/f0c1s/.nvm/versions/node/v11.1.0/bin/node]
 6: 0x100223dc7 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/f0c1s/.nvm/versions/node/v11.1.0/bin/node]
 7: 0x152f7e64fb7d 
Abort trap: 6

$ gulp --version
[13:21:41] CLI version 2.0.1
[13:21:41] Local version 3.9.1

$ node -v
v11.1.0

$ npm -v
6.5.0

$ yarn --version
1.13.0

More example code, please.

Thanks for lichess and GPL'ing this wonderful code. I am trying to bundle together a couple of games with stockfish running on the browser. Much like the analysis board you are demo'ing. I looked through the example given in index.standalone.html and index.html. By changing the location of the libraries and downloading chessboard.js, I have managed to get the page to display a board. But I don't know how to connect it up to a pgn file/string as there doesn't seem to be other examples or additional documentation.

I have downloaded the source code for the lichess analysis board to reverse engineer the process. Within the HTML, there's something that looks like
<div class="pgn">[Event "Rated Bullet game"] ... </div>
where the entire pgn is there. I tried doing the same on the index.standalone.html but I am missing the navigation buttons.

Also, the saved down analysis board source code, when re-opened in the browser is missing board image. I can see pieces but not the board. So that prevents me from starting with the lichess analysis board and discarding stuff till I get the minimal example that I want.

I was wondering if you could put up an example showing how to connect the chessground board to a pgn file/string in a HTML file like the index.standalone.html. Thanks very much.

using index.standalone.html

Hi,

I am missing this file

<script src="../node_modules/chessground/dist/chessground.js"></script>

Should the file be created when you follow the readme ?

yarn install
yarn exec gulp dev

Thanks

No gulpfile

There is no gulpfile included, so that following the Readme and executing gulp dev leads to an error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.