steveblue / angular2-rollup

CLI for bundling Angular with Rollup and Closure Compiler
121 stars 18 forks source link

Scaffolding a new library with a scoped name results in improper paths #33

Closed steveblue closed 5 years ago

steveblue commented 5 years ago

When running

ngr g lib my-lib

everything works as expected.

When running the same command with a scoped name

ngr g lib @my/lib 

@my/lib will resolve to {{projectName}} in scaffolded templates as it should, however {{projectName}} is also used in place of path/to/file. i.e. {{projectName}}/file, creating an additional folder where it is not needed in some templates. A new variable is required to resolve the correct path, regardless of scoped package or dasherized name.