Ionic app - Production

I’m trying to understand how to prepare a ionic app for production.
How to remove unused js files - like the unminified ionic file/ unminified angular files ?
How to combine/ compress css/js into a special folder (let’s say dist folder) and generate a new index.html pointing to the combined file (let’s say dist/app.js) - and change the cordova to use this new index.html file
Any ideas?

Have a look at the gulp file generated by generator-m-ionic

To remove unwanted files (unminified etc) installed by bower I use ‘preen’. You can run it as a gulp task, see for explanation: How to manage bower overweight?