To build the project you should first download and install Node.js.
when nodejs installed, you shall do the steps below:
You can skip parts 1 to 3 if you don't want to install these packages globally, they will be installed locally inside your node project.
- install CoffeeScript globally by using node package manager:
enter this script in your terminal or command prompt:npm -g install coffee-script
- install watchify this package creates a single JavaScript file from your coffee script files in realtime. it uses coffeeify to compile coffee files:
$ npm install -g watchify
- install coffeeify.
$ npm install -g coffeeify
- go to main project directory and install the project dependencies and packages:
$ npm install
or$ npm i
- I defined a command in package.json file so you can run watchify with proper options, it starts compiling your changes to a main.dist.js file in dist folder:
$ npm run watch
- now if you make any changes to the CoffeeScript files watchify updates the main.dist.js file on save
- open the page.html from pages folder and enjoy the game!!