https://johnresig.com/blog/programming-book-profits/
(I'm not sure if my expectation is reasonable, but I would have thought that a book the most popular JS framework author would have sold more / made more in profit.)
I know you said you weren't planning to write another book, but I wonder if in retrospect you would have self-published? I feel like the publisher provides a few things:
1) Editing
2) Marketing
3) Writing tools, typesetting, etc.
It seems like you had to take control of #1 yourself to some extent. As for #2, you got unexpected "sponsorships" income, which is very interesting, but it seems like you also had to take control of it yourself.
I was surprised that between the 2 of you, you would only make about $2 per physical book and $1 per e-book for a $40 book. If you end up having to do work in areas #1 and #2, why have the publisher at all? I would have expected them to give you more of a sales bump.
Here are some other posts I saved:
https://news.ycombinator.com/item?id=13876514 How I Made $70k Self-Publishing a Book about Ruby on Rails
https://news.ycombinator.com/item?id=14334845 Why We Are Self-Publishing the Aviary Cookbook
Anyway, thanks for sharing! I am just trying to think of what the publisher adds. The main thing I think would be marketing / sales / distribution. It's better to make a smaller amount on a larger number of copies than a large amount on a small number of copies. But it doesn't feel like it adds up in general, and in this particular case?
EDIT: also http://www.charlespetzold.com/blog/2007/10/081247.html Hard Work, No Pay: What's the Point?
(Not trying to be negative, just sharing sources I found. I have read at least one book by Petzold.)