Replication for Mirrored server
The -PublisherFailoverPartner option should help you out in your case. I am assuming you want to have replication running irrespective of database running on principal/mirror server.

Below links have your issue covered and has all the details on how to configure it. 

http://blogs.lessthandot.com/index.php/datamgmt/dbprogramming/replication-and-mirroring-setup/

https://www.pythian.com/blog/how-to-configure-transactional-replication-mirroring-failover/

https://msdn.microsoft.com/en-us/library/ms151799.aspx

Test it out in your test environment before implementing it on PROD.