nativescript-schematics icon indicating copy to clipboard operation
nativescript-schematics copied to clipboard

NS7: Shared files get generated on NS-only projects.

Open OscarMeier opened this issue 5 years ago • 2 comments

Environment

OS: win32 x64 Node: 12.18.2 NativeScript: 7.0.11 Angular CLI: 11.0.5

Describe the bug

The isWeb method returns true if there is a nativescript.config.ts file:

https://github.com/NativeScript/nativescript-schematics/blob/c087d4843843e13c52e39fea3106349fd5fdb855/src/generate/utils.ts#L33

In NS7 projects the configs are all consolidated into a single nativescript.config.ts per default also in NS-only projects. Therefore the ng-CLI generates shared files in NS7 projects:

$ ng g m test
CREATE src/app/test/test.module.ts (190 bytes)
CREATE src/app/test/test.module.tns.ts (269 bytes)
CREATE src/app/test/test.common.ts (177 bytes)

Expected behavior The isWeb method should check the shared attribute of the NativeScriptConfig in NS7 projects.

OscarMeier avatar Jan 07 '21 18:01 OscarMeier

This is fixed in #314

agonper avatar Apr 21 '21 12:04 agonper

I guess this issue can be closed now @NathanWalker 😃

agonper avatar Apr 21 '21 16:04 agonper