block by Fil 5f8c92efadd183670ae8c63a060f03b8

Developing on d3-geo-projection for d3 v4

Developing on d3-geo-projection for d3 v4

download code

git clone
cd d3-geo-projection/
git checkout --track origin/4

download dependencies

npm install

(at first I thought I had to npm install d3-geo canvas package-preamble rollup tape eslint, my mistake)

Make sure you have a recent version of compare (mine was an old thing in MAMP, just delete it or remove it from $PATH)

brew install optipng

run tests

npm test 2>&1 | tee test/output/testlog.txt

publish tests

first time:

cd test/output/ && gistup


cd test/output/ && git commit -a -m"up" && git push

tests output

Editing a projection from 4-broken

git checkout 4
git checkout -b $branch
git cat-file blob 4-broken:src/$projection.js > src/$projection.js
bbedit test/compare-images src/$projection.js index.js
test/compute-scale $projection
npm run pretest && test/render-world $projection

tweak until tests work

optipng test/output/$projection.png
cp test/output/$projection.png img/
bbedit test/compare-images
git add test/compare-images index.js src/$projection.js img/$projection.png
git diff
git status


Create the PR

git commit -a -m"$projection v4"
git push --set-upstream origin $branch