- Clone repo
git clone git@github.com:UN-OCHA/hid_app2.git
- In the app directory
cd hid_app2
- Switch to the dev branch
git checkout dev
- Install node modules
npm install
- Install Bower modules
bower install
- Add the local url to your hosts file:
on Mac:
sudo vi /etc/hosts
Add127.0.0.1 app.hid.vm
- Run the Grunt tasks
grunt
(Note to set you local environment to use the staging api usegrunt --target="dev"
)
docker-compose up
- visit http://app.hid.vm
See https://github.com/UN-OCHA/hid-stack/blob/master/README.md
This project aims to follow the John Papa Angular 1 style guide
Unit tests are written using Jasmine and run with Karma.
Install Karma CLI
npm install -g karma-cli
Single run: grunt test
Watch for changes an re-run tests: grunt test-watch
The styleguide and pattern library is available at https://un-ocha.github.io/styleguide/hid/
This project uses Sass
Run grunt watch
to watch for changes and rebuild the css.
Global styles, such as resets and grid styles, should be added to app/common
.
Any _*.scss file in app/common
(excluding sub-directories) will be automatically added to the CSS build.
As variables and mixins need to be imported before other Sass these are added to sub-directories in app/common
and manually imported into app/common/_setup.scss
Component specific files should be added to that component's directory, e.g. app/components/my-component/my-component.scss
.
Any _*.scss file in app/components
(including sub-directories) will be automatically added to the CSS build.