Check out the relevant article.
An example for "Making an Addable Angular Package Using Schematics" article