I'm making my own Angular 2 module with Angular-CLI. How to prepare module to import? How do I publish the final output to NPM for use with other Angular2 projects?
I've managed to publish my project to npm. Here's what I did.
In angular-cli project my module went to single folder (component-warpper).
In that folder I've added index.ts with list of modules and components to export.
I also added package.json file (screenshot).
Then in command line go to this folder and npm publish.
Now I can import it as node_modules in other projects.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With