I am writing a reusable library to use in my applications. I would like to
follow the angular naming pattern for my modules.
Thus far I have:
@mylib/core
@mylib/core/testing
I generated these with the angular cli:
ng g library @mylib/core
When generating @mylib/core/testing I ran into the error that "this is not
valid package name". I checked the angular src, and indeed there is a
package.json file located at ./packages/core/testing and the name is in
fact @angular/core/testing - so I thought this was just a shortcoming on
behalf of the cli.
So i created my package manually - and everything went well, npm
ng build --prod @mylib/core/testing ran successfully. Now the issue comes
when I try to npm pack - this does not work. I get the same message about
the package name not being valid.
Browsing npm i see that @angular/core/testing is in fact not on npm. So it
would appear there is some magic happening somewhere.
What I would like is to be able to have
import { MyTestingStub } from '@mylib/core/testing' just like angular.
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.