This is the basis for a third party widget for AskThem.io, it will be distributed via jQuery loader and multiple instances of the Ember app will be able to run on a page.
It is an Ember.js app that allows users to ask someone specific, like an elected official, ask a question on AskThem.io
This README outlines the details of collaborating on this Ember application.
You will need the following things properly installed on your computer.
And also this addon that is currently unreleased:
You need to clone that repository, cd into it, and run "npm link" before proceeding with installation.
git clone <repository-url>
this repository- change into the new directory
npm link ember-cli-ic-modal
ember install
- answer "1" for ember#canary from the prompt from bower (after ember 1.12.0 is released, probably a good idea to switch to standard ember releases)
ember server
- Visit your app at http://localhost:4200 or if you are like me, set up pow for that port and visit the appropriate pow URL.
In development and testing the app relies on having a local copy of askthem.io running at askthem.dev, YOU'LL NEED TO CHANGE config/environment.js a bit to get it working without it. Here's how:
ENV.APP.askThemHost = 'askthem.dev' # under development/test change to 'www.askthem.io'
This app takes meta tag declared options, using ember-cli-meta-options, to configure the app. See notes under deployment about configuration.
ember test
ember test --server
ember build
(development)ember build --environment production
(production)
During a production build, I have added an additional step using ember-cli-make-concoction that creates an "app template" that the jQuery loader will then instantiate with a unique Ember app modulePrefix, etc. This the trick that allows multiple instances of the widget to run on a host page.
This can safely be ignored unless you are specifically using it with the jQuery loader.
In the case of AskThem.io, this is a manual process right now. I'll write a post about it at some point.
Otherwise the deployment should be fairly standard. Just remember to set up your configuration via meta tags on the host page. See app/index.html and tests/index.html for example configuration.
Originally developed by Walter Mcginnis.
This ember-cli add-on was built as a part of widget work for http://askthem.io.
Thanks to the Ember.js, ember-cli, and Broccoli teams for excellent work.