The DAMATS Client provides web-based user interface to the DAMATS Server.
The application uses Yeoman which integrates:
- Yo : scaffolds out the application, writing the Grunt configuration and pulling in relevant Grunt tasks that you might need for your build.
- Grunt : which allows building, previewing and testing the project
- Bower : which allows managing of dependencies and automatic download, thus making the application easily extendible.
-
Get the code from GitHub DAMATS repository:
git clone [email protected]:DAMATS/DAMATSClient.git
or, just for inspecting the code without the possibility to push changes back to github:
git clone https://github.com/DAMATS/DAMATSClient.git
-
Install development environment:
Make sure Node.js and NPM are installed on your machine and run:
sudo npm install -g grunt-cli sudo npm install -g bower cd ./DAMATSClient/ npm install
These commands install the needed Node.js packages. In case of any trouble try to use a reasonably recent version of Node.js. Also note that newer versions of Node.js contain the NPM already bundled in the baseline installation.
-
Install client dependencies:
The required JavaScript frameworks can be installed by:
bower install
-
Start the Grunt development server:
grunt server
and point your browser to port 9000 of the machine where the grunt is running.
If you managed to reach this the last step you can start to hack the code. The browser view refreshes itself automatically reflecting the code changes made.
-
Create deployment package:
grunt build
This command creates
DAMATSClient/dist/
directory containing the produced deployment version. Take the directory and mode it to other location:mv DAMATSClient/dist/ ./DAMATSClient-my-build-x.y.z
This directory should be then packed by some archiving tool (
zip
,tar
,cpio
... etc.) creating the deployment package, e.g., as follows:tar -cvzf ./DAMATSClient-my-build-x.y.z.tgz ./DAMATSClient-my-build-x.y.z
This deployment package is independent of the grunt development environment and can be deployed as static content with any web-server capable of serving static files.
-
Copy and unpack the content of the deployment package to your server and make sure the web-server can access the
index.html
file. -
Tailor the client's configuration (
config.json
anddata.json
files) to fit your application.
-
Setup PPA repository to get latest Node.js:
Execute following command to add Chris Lea's Node.js repository:
sudo add-apt-repository ppa:chris-lea/node.js
Update the apt sources:
sudo apt-get update
And finally install the Node.JS:
sudo apt-get install nodejs
-
Install Ruby, Ruby Gems and Compass
Run following commands:
sudo apt-get install ruby rubygems-integration ruby-dev sudo gem install compass
-
Install global Node.JS components:
sudo npm install -g grunt-cli sudo npm install -g bower
-
Get the code from GitHub DAMATS repository:
git clone [email protected]:DAMATS/DAMATSClient.git
or
git clone https://github.com/DAMATS/DAMATSClient.git
-
Install development environment:
cd ./DAMATSClient npm install
-
Install client dependencies:
The required JavaScript frameworks can be installed by:
bower install
-
Start the Grunt development server:
grunt server
and point your browser to port 9000 of the machine where the grunt is running.