generator-angular2-library icon indicating copy to clipboard operation
generator-angular2-library copied to clipboard

Add support for namespaces

Open broweratcognitecdotcom opened this issue 7 years ago • 6 comments

We constantly have to edit package.json files and tsconfig.es5.json because we use a company namespace, examples: @cognitec/ui, @cognitec/authentication, etc.

When I want to use the generator, I am in .../@cognitec/ folder. I typically mkdir, example: mkdir ui then I run the generator, e.g. yo angular2-library and I enter in the name of the package, e.g. @cognitec/ui but this results in a flat module ID of cognitec-ui instead of what we need.

It would be wicked awesome if the generator was capable of figuring out from the package name that the user enters, e.g. @cognitec/ui, that the user is in the @cognitec folder and proceeded to create the ui folder, and package.json and tsconfig.es5.json files that contained @cognitec/ui as the package name and flat module ID.

Thanks for this excellent generator. It has been invaluable to us.

broweratcognitecdotcom avatar Jan 17 '18 15:01 broweratcognitecdotcom

Hi @broweratcognitecdotcom i'm doing this already in a customised version of the generator i'm happy to share it in a PR

izifortune avatar Jan 20 '18 15:01 izifortune

@izifortune Sweet. Please do.

broweratcognitecdotcom avatar Jan 25 '18 12:01 broweratcognitecdotcom

@izifortune Any update on this? I would love to have this enhancement.

adamk33n3r avatar Feb 13 '18 22:02 adamk33n3r

Sorry @Adam I will make some time this week to share this

izifortune avatar Feb 13 '18 23:02 izifortune

Hi @adamk33n3r please have a look at this PR #283. Hope i'm not missing anything there

izifortune avatar Feb 20 '18 21:02 izifortune

@izifortune — Thank you for your follow-up, much appreciated! 🏆

jvandemo avatar Feb 20 '18 22:02 jvandemo