Giter Club home page Giter Club logo

decider's Introduction

Decider

An application/tutorial/workshop based on rock, paper, scissors.

Branches:

  • mainis at the start of the workshop.
    • Run make install then make test and finally make run.
    • Alternatively, reference the setup instructions below to recreate this from scratch.
  • solutioncontains a worked solution to the workshop exercises

Setup

The main branch is already setup. Skip this section unless you'd like to start yourself from scratch.

The rps module

mkdir rps
cd rps
npm init -y # accept defaults
npm install --save-dev @babel/core @babel/preset-env babel-jest jest

babel.config.json

{
  "presets": [
    "@babel/preset-env"
  ]
}

Add this topackage.json

{
  "scripts": {
    "test": "node_modules/.bin/jest"
  }
}

Test this with

npm test # Should see one passing test

The web module

mkdir web
cd web
npm init -y # accept defaults
npm install --save-dev @babel/core @babel/preset-env @babel/preset-react babel-loader babel-jest jest webpack webpack-cli
npm install --save ../rps react react-dom react-app-polyfill

Add this topackage.json

{
  "scripts": {
    "start": "NODE_ENV=development webpack --mode development --watch",
    "test": "node_modules/.bin/jest"
  }
}

See the contents of these files:

Next you can run and open the file in the browser:

npm start
open index.html

Next Steps

There is more information about writing the first wiring tests for each module.

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.