Berkeley Eco Engine compare demo
JavaScript HTML CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build @ ccf78f6
helpers more asset path updates Mar 17, 2015
holos cleanup Apr 3, 2015
js capture menu state in the url Feb 19, 2015
sass
templates Fix tile urls for feb Oct 13, 2015
viewJs
.bowerrc Allow bower to run non-interactively Jan 9, 2015
.env.json.sample fix env target Apr 3, 2015
.eslintrc
.gitignore build updates Mar 17, 2015
.gitmodules
.jshintignore starting to integrate d3 hexbin with leaflet Feb 5, 2015
.jshintrc
Gulpfile.js ninja2 → jinja2 Mar 10, 2016
README.md
bower.json removed legend layer menu as bower dependency Mar 17, 2016
package.json fix js path in gulpfile Apr 3, 2015

README.md

Berkeley Eco Engine compare demo

For issues with this repository, please file over at http://github.com/stamen/ecoengine/issues

Setup

gem install sass
npm install
cp .env.json.sample .env.json

Deploy

gulp
scp -prq ./build/. studio.stamen.com:www/berkeley/show/compare/
scp -prq ./build/. studio.stamen.com:www/berkeley/show/compare-[year]-[month]-[day]/

Open http://studio.stamen.com/berkeley/show/compare/

This ...

Develop

npm start

This ...

Open http://localhost:8000/

URL Shortening

For the URL shortener to work, you will need to get a key for the Google URL Shortener API. The key must be in the .env.json file in the repo root as google-key

Adding vendor JS libraries

bower install [bower package name]

All bower components are bundled into the minified JS for the site. Any required css is wrapped into vendor.css and included in the header

Things to know about javascript in this project

  • All JS is linted as you save. Errors can stop JS from being built. Keep you eye on the terminal for errors
  • view specific code is in the ./viewJs file and all shared scripts are in the ./js folder.
  • All js is included in the footer.

Holos integration

A django/jinja2 compatible template has been added to the root of the build directory. This can be used as a jinja2 include to bring in the markup needed to run this application without the header and footer. The following files need to be linked in the main document:

  • css/vendor.css (in the document head)
  • css/base.css (in the document head)
  • js/ecoengine-compare.min.js (at the bottom of the document body)