Best practice for building npm libraries for ionic?

I am about to tinker with this approach - https://github.com/jvandemo/generator-angular2-library - suggested from this post - https://hackernoon.com/how-to-create-library-in-angular-2-and-publish-to-npm-from-scratch-f2b1272d6266.

Is there a different way people have done this for ionic?