forked from vicapow/water-supply
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (36 loc) · 2.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
DS = $(shell node -e "var t = new Date(+new Date() - 1000 * 60 * 60 * 24); console.log((t.getMonth() + 1) + '/' + t.getDate() + '/' + t.getFullYear() )")
reservoirs: public/data/reservoirs.csv public/data/reservoirs.capacities.csv
public/data/reservoirs.csv: scrappers/reservoirs.js
node scrappers/reservoirs.js > public/data/reservoirs.csv
shapefiles: public/data/counties.topojson
California\ County\ Shape\ Files/: shapefiles.tar.gz
tar zxvf shapefiles.tar.gz
California\ County\ Shape\ Files/County/CaliforniaCounty.shp: California\ County\ Shape\ Files/
public/data/counties.json: California\ County\ Shape\ Files/County/CaliforniaCounty.shp
ogr2ogr -f GeoJSON public/data/counties.json \
California\ County\ Shape\ Files/County/CaliforniaCounty.shp
public/data/states.json: State\ Boundaries/statesp020.shp
ogr2ogr -f GeoJSON public/data/states.json State\ Boundaries/statesp020.shp
public/data/states.topojson: public/data/states.json
topojson public/data/states.json -p -o public/data/states.topojson
public/data/counties.topojson: public/data/counties.json
topojson --ignore-shapefile-properties -o public/data/counties.topojson public/data/counties.json
public/data/latest-capacities.json: scrappers/latest-capacities.js
node scrappers/latest-capacities.js $(DS)
latest-capacities: public/data/latest-capacities.csv
public/data/latest-capacities.csv: public/data/latest-capacities.json scrappers/join-capacities-latest.js
node scrappers/join-capacities-latest.js $(DS) > public/data/latest-capacities.csv
uglifyjs:
uglifyjs public/js/d3.js > public/js/main.min.js
uglifyjs public/js/angular.js >> public/js/main.min.js
uglifyjs public/js/topojson.v1.js >> public/js/main.min.js
uglifyjs public/js/main.js >> public/js/main.min.js
uglifyjs public/js/directives/bar-chart.js >> public/js/main.min.js
uglifyjs public/js/directives/water-map.js >> public/js/main.min.js
uglifyjs public/js/directives/loading-dialog.js >> public/js/main.min.js
uglifyjs public/js/directives/reservoir-detail.js >> public/js/main.min.js
uglifyjs public/js/directives/scale-slider.js >> public/js/main.min.js
uglifycss:
uglifycss public/css/style.css > public/css/style.min.css
uglify: uglifycss uglifyjs
.PHONY: uglifycss uglifycjs