kharmon11 / games

A flask app for a collection of games

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

games.kenharmon.net

games

A flask app for a collection of games nodeJS v6.10.1 python 2.7.13

Setup


  • Clone repository.
  • Install the Google Cloud SDK. Instructions can be found here
  • Install python dependencies: pip install -t lib -r requirements.txt
  • Install nodeJS from here (if you do not have it already)
  • Install Webpack globally: npm install -g webpack
  • Install npm dependencies: npm install
  • Test on a local dveelopment server using dev_appserver.py in the root directory: dev_appserver.py .

Adding a Game


Add HTML file to templates directory. Add CSS file to static/css.

For your javascript files, you have two options:

  • Add a javascript file directly into static/js, if you plan to only use vanilla javascript with no node modules.
  • If you wish to take advantage of node modules, such as using ES6 compilers, you will need to javascript bundlers:
  • Store your code in its own directory in src
  • The convention for this project is name the entry point file 'index.js'
  • Modify webpack.config.js to include your files for bundling.

    
    entry: {
            tictactoe: './src/tictactoe/index.js',
            blackjack: './src/blackjack/index.js',
            yourgame: './src/yourgame/index.js
        }
    

  • In the root irectory, use npm run build to create a new bundle. The bundled javascript should appear in src/js/yourgame.js

About

A flask app for a collection of games


Languages

Language:JavaScript 64.7%Language:HTML 20.9%Language:CSS 12.7%Language:Python 1.7%