Ushahidi Platform Pattern Library
Installation
"What's bower?"
"A package manager, install it with npm."
"What's npm?"
"A package manager, you can install it with brew"
"What's brew?"
...
— Stefan Baumgartner (@ddprrt) November 5, 2014
All jokes aside (for now at least), the Ushahidi Platform requires a few steps to get started.
Download or Clone from Github
- Visit Github to download the repo to your local environment
- or use
git clone
git clone https://github.com/ushahidi/platform-pattern-library.git
Install Dev Dependencies
You will need to install the following dependencies to run the Ushahidi Platform.
- NodeJS - Install via Homebrew or the NodeJS homepage
- Bower
- Browserify
- Gulp
After installing NodeJS, run the following commands to install each dev dependency globally.
npm install -g bower
npm install -g browserify
npm install -g gulp
Install Required Packages
After installing the dev dependencies you will need to install the following packages:
Bower
Node
- Gulp plugins (these plugins are used for a variety of build tasks located within
gulpfile.js
) - The Ushahidi Platform uses node-sass (via the gulp-sass plugin), which is a node front end for LibSass. We chose Libsass over RubySass because of its speed and Node over Ruby dependency.
- Watchify
Navigate to the root of your project and install these Node and Bower packages by simply running ...
npm install
This will install both NPM and Bower dependencies!
No separate bower install
command is required.
Download and Activate Live Reload Plugin
Navigate to project root and run ...
gulp build
- compiles sass into
assets/css
- minifies and concatenates js into
assets/js/app.js
- builds html files into
assets/html
- generates font files into
assets/fonts
- generates font sass files into
assets/sass/utils/font-awesome
gulp
- starts a webserver accessible at http://localhost:8080/
- watches the project directory for changes
- compiles sass into
assets/css
- minifies and concatenates js into
assets/js/app.js
- builds html files into
assets/html
- live reloads appropriate files (sass, js or html)
- sends a success notification
Now visit http://localhost:8080/ to view the website in action.