Built with
- yeoman generator-webapp
- external dependencies
The web pages are built with Bootstrap 3 grid and components and don't contain any written javascript at the moment—just HTML and CSS. Thus these pages won't work on older browsers that don't support, e.g. css flexbox. That's where Javascript will prove useful.
- Get source code
- create ssh key for Futurice gitlab
ssh-keygen -t rsa -C "[email protected]"
- view created public key
cat ~/.ssh/id_rsa.pub
- click Add public key in code.futurice.com and copy paste key from terminal
- clone project repository
git clone [email protected]:hy_mobiiliohjeistus.git
- go to project root directory
cd hy_mobiiliohjeistus
- create ssh key for Futurice gitlab
- Install development environment
-
install node.js and npm (with homebrew)
- update homebrew formulas
brew update
- install node.js
brew install node
- update homebrew formulas
-
install compass and compass-flexbox (with ruby gem)
- update gems
sudo gem update --system
- install compass
sudo gem install compass
- install compass-flexbox
sudo gem install compass-flexbox
- update gems
-
install yeoman which comes with grunt and bower
npm install -g yo
-
- Install project dependencies
- install npm dependencies
npm install
- install bower dependencies
bower update
- install npm dependencies
- Start development server
grunt serve
- Url should open automatically in default browser. If not, browse to url at the end of prompt.
This project has three different dependencies
- npm dependencies in package.json
- add new npm dependency by
npm install packagename --save-dev
--save-dev adds packagename and version to package.json - after committing/pushing the changes to git, others will have to run
npm install
after they have pulled the changes to install updated/added versions of the dependencies to their local machine
- add new npm dependency by
- bower dependencies in bower.json
- add new bower dependency by
bower install packagename --save
--save adds packagename and version to bower.json - after committing/pushing the changes to git, others will have to run
bower install
after they have pulled the changes to install updated/added versions of the dependencies to their local machine
- add new bower dependency by
- compass dependencies in Gruntfile.js compass:options:require
- install new compass dependency from gem
- add new compass dependency to Gruntfile.js
- after committing/pushing the changes to git, others will have to install the required compass dependencies from gem to their local machine after they have pulled the changes
All the development happens in app directory
You should not make changes to dist directory, because each grunt build
will overwrite the changes. The files contain also all the css and js from bower dependencies, e.g. bootstrap css and js which you shouldn't touch.
- Build project
- in project root directory
grunt build
- grunt will create new folder dist that contains the published project
- you can also test the built project with
grunt serve:dist
(will also build the project)
- in project root directory
- Move contents of the dist directory to a web server