Demonstration of the data visualisation possibilities for the Draw My Life project.
git clone https://github.com/empowerhack/DU-data-viz-demo.git && cd DU-data-viz-demo
- You'll need to have Yarn installed globally on your local machine. This can be installed via homebrew
- To install all the dependencies for this project you will need to
yarn install
on the command line - To add a dependency
yarn add {dependency}
on the command line. - If it's a development dependency add the flag
--dev
. Exampleyarn add {dependency} --dev
to save to thepackage.json
- If it's a production dependency add the flag
--save
. Exampleyarn add {dependency} --save
to save to thepackage.json
No time for bells and whistles, we're using good old NPM. It's best to have the node server and watcher/builder running at the same time, so you will need two terminals for this.
We are using lite-server
as our node server to serve our web app, opens it in the browser, refreshes when html or javascript change.
Command: yarn run dev
Using watchify
we are watching the src
directory for changes and transpiling the ECMAScript 6 code to back down to ECMAScript 5, so that the browser can understand. The transpiled bundle is then moved to the public/js
directory
Command: yarn run watch:bundle
We can deploy straight onto our gh-pages
branch by running the command yarn run gh-pages
. This will deploy the public
directory to the gh-pages
branch.
Command: yarn run gh-pages