Git Product home page Git Product logo

reason-react-tictactoe's Introduction

Tic-tac-toe with Reason + React

A simple tic-tac-toe implementation using Reason and Reason-React, built on top of the boilerplate from chenglou/reason-react-example, using bs-glamor for styling.

Live Demo

Setup

npm install

# start Bucklescript compiler in watch mode in one tab:
npm start
# start Webpack in watch mode in another tab:
npm run build

Then open src/index.html to play a round of tic-tac-toe against yourself.

Take a look at ReasonVienna/dev-setup for a very reasonable description of how to set up your development environment.

Deploying to GitHub Pages

git checkout master
npm run docs
git commit -am "update docs"
git push

reason-react-tictactoe's People

Contributors

poeschko 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

Watchers

 avatar  avatar

reason-react-tictactoe's Issues

Build Errors

If you download, npm install, npm run build, the project doesn't run. Just an FYI, I was trying to understand glamor in reason. Are you aware of any other examples?

[1/3] Building src/Board.cmj
FAILED: src/Board.cmj /Users/shingdev/code/REASON/reason-react-tictactoe-master/lib/js/src/Board.js src/Board.cmi
/Users/shingdev/code/REASON/reason-react-tictactoe-master/node_modules/bs-platform/bin/bsc.exe -bs-package-name reason-react-tictactoe  -bs-package-output commonjs:lib/js/src -bs-assume-no-mli -bs-no-builtin-ppx-ml -bs-no-implicit-include -I /Users/shingdev/code/REASON/reason-react-tictactoe-master/node_modules/reason-react/lib/ocaml -I /Users/shingdev/code/REASON/reason-react-tictactoe-master/node_modules/bs-glamor/lib/ocaml -I src  -w -30-40+6+7+27+32..39+44+45 -nostdlib -I '/Users/shingdev/code/REASON/reason-react-tictactoe-master/node_modules/bs-platform/lib/ocaml' -no-alias-deps -color always -bs-re-out -bs-super-errors -o src/Board.cmj -c  src/Board.mlast

  We've found a bug for you!
  /Users/shingdev/code/REASON/reason-react-tictactoe-master/src/Board.re 3:6-11

  1 │ open Game;
  2 │
  3 │ open Glamor;
  4 │
  5 │ module Board = {

  The module or file Glamor can't be found.

  - If it's a third-party dependency:
    - Did you list it in bsconfig.json?
    - Did you run `bsb` instead of `bsb -make-world`
      (latter builds third-parties)?
  - Did you include the file's directory in bsconfig.json?

ninja: build stopped: subcommand failed.
>>>> Finish compiling(exit: 1)

With apologies in advance, any idea what would cause this ...

Your live demo runs fine, but my local git clone shows this when I open index.html (directly from file system on osx, no web server):

image

No other error in browser console. Please feel free to ignore / delete / etc. if this channel is not appropriate for this question.

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.