block by fil 5f8c92efadd183670ae8c63a060f03b8

Developing on d3-geo-projection for d3 v4

Developing on d3-geo-projection for d3 v4

download code

git clone https://github.com/d3/d3-geo-projection
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

afterwards:

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

tests output

Editing a projection from 4-broken

projection=robinson
branch=geoRobinson
projection=...
branch=geo...
git checkout 4
git checkout -b $branch
git cat-file blob 4-broken:src/$projection.js > src/$projection.js
bbedit test/compare-images README.md 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 README.md src/$projection.js img/$projection.png
git diff
git status

Inspect.

Create the PR

git commit -a -m"$projection v4"
git push --set-upstream origin $branch
open https://github.com/d3/d3-geo-projection/compare/4...Fil:$branch?expand=1