Build: Publish dist files on npm, add main directive

Fixes #1339