Using TableTopSkeleton to get started.
If you're using Windows, you'll need to check out our Windows Setup Instructions
First you'll want to go to the TableTopSkeleton page: http://github.com/andrewjmeier/TableTopSkeleton
- Click on
Fork
on the top right of the page. This will create a new repository for you to create your board game. - Next find the link on the right side of the page under
HTTPS clone URL
. Copy this link - Open up the
Terminal
application on your computer and pastecd ~/Documents/
. Press Enter. - Next enter
git clone
followed by the URL from above that you copied. Press Enter
. This will download the project to your computer and setup git which is a version control system. You can learn all about git from github.- Then enter
cd TableTopSkeleton
. This will switch your current directory from Documents to TableTopSkeleton which you just downloaded. - Now that we have the skeleton project downloaded, there are a few more things that we need to setup.
- To start, you'll need to have Homebrew installed on your computer. Homebrew is a great tool for managing different software packages. You can ready about it here but it's not crucial that you understand what it's doing. We just need it to install some other software.
- To install Homebrew enter
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
into the terminal window and press enter. - Now that that's done, we can install npm using Homebrew. Enter
brew install npm
into the terminal. - Using npm, we'll install webpack which is a tool that compiles JavaScript together. Enter
npm install -g webpack
. - Now enter
npm install
. This will download some external dependencies for your project (including the TableTop framework) - Open the
package.json
file to customize the project for your board game (you can enteropen .
in the terminal to show the folder in Finder) - You'll want to edit a bunch of lines in this file:
- Add the name of your game
"name": "your-game-name-here"
- Update the description of your game
"description": "A board game using TableTop.JS"
- Add the link to your github repository
"repository": { "type": "git", "url": "git+https://github.com/your-github-user-name/your-project-name.git" }
- Add yourself as the author of the project
"author": "FirstName LastName <[email protected]>"
- Add your github repo's issues page
"bugs": { "url": "https://github.com/your-github-user-name/your-project-name/issues" }
- Change the homepage
"homepage": "https://github.com/your-github-user-name/your-project-name#readme"
- Add your code in the
/src
directory - To compile your code, enter
npm run webpack
in the Terminal. This command takes all of the different JavaScript files and combines them into a single file to use on the webpage. The HTML fileindex.html
has been setup to look for the compiled JavaScript file and that's how your game will run. Webpack will continue to rebuild your project automatically every time you save a new file. If you want to stop executing it, you can enter control-c^c
in the terminal. - You're all set! Open the
index.html
file and check out your game!