Remove dist, replace with pre- and postpublish hooks, remove unused scripts.