Development Environment Setup & Deployment Instructions
Author(s): Jun Zheng (junthehacker)
Date: October 27th, 2017
When contributing, please add your name to authors list, and update the date.
- Missing database setup instructions (please contribute if anyone have time).
- Node.js, latest LTS version recommended.
- NPM, match your Node.js version.
- Less.js.
- File watcher for Less.js [development environment only].
It is recommended for you to use NVM (Node Version Manager). Run the following command to install NVM.
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
After successful installation, restart terminal, run nvm install --lts
to install the latest LTS release.
Simply download the installer on https://nodejs.org/en/
.
NPM (Node Package Manager) should already been installed. Run nvm -v
to verify.
We use Less for all stylesheets, so you have to install Less.js. Run the following command to install Less.js globally.
$ npm install less -g
Run lessc -v
to verify your install.
jun@192:~/shared$ lessc -v
lessc 2.7.3 (Less Compiler) [JavaScript]
Install less-plugin-clean-css
plugin to support minifying CSS output.
npm install -g less-plugin-clean-css
You can choose from different file watchers for Less.js, less-watcher
and less-watch-compile
all works.
If you are using JetBrains IDE, then you are all set.
- Clone the repository, and cd into it.
- Run
npm install
to install all dependencies.
Simply setup your Less watcher to compile all .less
files to .css
. If you are using less-watch-compile
, the two main.less
files are the ones you wish to always compile upon change.
If you are using JetBrains IDE, just use the file watcher tool.
node app.js
Same as development environment, but you do not need File Watcher for Less.js
part, instead, run one-time compile.
lessc --clean-css public/app/styles/chatroom/main.less public/app/styles/chatroom/main.css && \
lessc --clean-css public/app/styles/ice/main.less public/app/styles/ice/main.css