Recompile piwik.js to reduce it's size

Hi,
Can anyone please tell how can I recompile and minify piwik.js? I want to reduce it’s size by removing features that I do not need, for example, e-commerce tracking, downloads tracking, website overlay, etc.

Thanks.