Build script for CommonJS conversion and npm publish