A flask app for a collection of games nodeJS v6.10.1 python 2.7.13
- 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 .
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 insrc/js/yourgame.js