-
Install Node.js
v6.9.4
-
Clone the repo
$ git clone https://github.com/ZakMiller/TheEmpire.git
- Install dependencies
$ npm install
$ npm install -g gulp
-
Get Visual Studio Code Extensions ESLint and beautify.
-
Add these to the VSCode settings.json file:
{
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"editor.formatOnSave": true,
"eslint.enable": true,
"eslint.run": "onSave",
"eslint.autoFixOnSave": true
}
note: if any of these don't work, make sure you have gulp installed globally:
$ npm install -g gulp
$ gulp
Basically, this will
- restart the server whenever either
server.js
or any of the backend JavaScript files are saved, and - build the front end scripts whenever they are saved
note: Make sure to refresh your browser page in order to see frontend changes.
Our build flow is
public/scripts/*.js --> Babel (ES6 -> ES5) --> Browserify (bundles scripts) --> public/bundle.js
$ gulp build
If you run into any errors when trying to start the application, consult the following checklist:
- make sure you're up to date with the current master
$ git pull origin master
- make sure you have all the dependencies
$ npm install