This build uses npm, gulp, and browserify to manage dependencies.
To install gulp:
To build the js/css:
npm install to download the 3rd party libs in
- during development:
gulp in the background, i.e. run
gulp in a terminal and leave it running. It will automatically recompile
css.main.css files as you edit the src files.
- when preparing for production:
gulp dist to create minified
To run the project:
npm install -g http-server
- go to
- in the future, since you've already installed http-server you can just run
- LICENSE.txt - the MIT license
- README.md - this help file
- images/ - contains the marker image files for AwesomeMarkers
- leaflet.awesome-markers.css - CSS for AwesomeMarkers Leaflet plugin
- normalize.css - cross-browser CSS, derived from HTML5 Boilerplate
- main.css - the single CSS file that the browser uses, compiled from the SASS files in scss/
- gulpfile.js - the gulp file. This file tells gulp how to compile app.js from the various libraries and src files.
- humanfont/ - HumanitarianFont, the font we use for the markers.
- humans.txt - the credits. Add yourself!
- index.html - the sole HTML file that serves to convey all of this JS
- js/app.js - the single minified JS file that the browser uses, compiled from the other JS files and libraries.
- node-modules/ - the libraries that are installed by npm. If the build has run successfully, this folder should contain:
How Services Data Is Loaded and Translated
cat sources.txt | node getJSON.js
- this will call all the urls in
sources.txt and then concatenate all the json responses into
- this takes the json from
services.json and removes all the
comments fields (which aren't translated) to output
data.csv to regex replace the English strings in
js/services_EN.json with their Arabic translations. This outputs