This README outlines the details of collaborating on this Ember application. A short introduction of this app could easily go here.
You will need the following things properly installed on your computer.
- Git
- Node.js (with npm)
- Ember CLI
- Google Chrome
git clone <repository-url>this repositorycd ny-primary-2018npm install
ember serve- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Make use of the many generators for code, try ember help generate for more details
ember testember test --server
npm run lint:jsnpm run lint:js -- --fix
ember build(development)ember build --environment production(production)
Specify what it takes to deploy your app.
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>403</HttpErrorCodeReturnedEquals>
<KeyPrefixEquals>ny-primary-2018/</KeyPrefixEquals>
</Condition>
<Redirect>
<HostName>staging.project.wnyc.org</HostName>
<ReplaceKeyPrefixWith>ny-primary-2018/#</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
</RoutingRules>
ogr2ogr- mac os install:
brew install gdal topojson:npm i -g topojson
- pull down latest shapefiles from census.gov
- https://www.census.gov/geo/maps-data/data/cbf/cbf_cds.html
- use the 20m resolution level
- generate geojson from the shapefile (
.shp) $ ogr2ogr -f GeoJSON districts.json <shapefile>.shp -sql "SELECT CAST(CD115FP AS INTEGER) AS district FROM <shapefile> where STATEFP='36'"- note using the
.shpextension in the command and leaving off the extension in the SQL - compress
$ gzip -9 geo.json$ mv geo.json.gz geo.json- upload to S3
- set Content Type header to
application/json - set Content Encoding header to
gzip
run the following from the command line
$ npm run cal
This will generate primary.ics in your current working directory and upload it to S3.
Specify the name of the event with the CAL_CONTENT envvar.
Specify the location of the uploaded file with the AWS_BUCKET and AWS_PREFIX envvars. /assets/primary.ics will be appended to create the final location.