Skip to content

Commit

Permalink
fix(generators): feature now properly supports groupByName workspaces
Browse files Browse the repository at this point in the history
closes #120
  • Loading branch information
NathanWalker committed Dec 2, 2019
1 parent 6af8d1f commit fb8d096
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/xplat/src/utils/xplat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1442,13 +1442,21 @@ export namespace XplatFeatureHelpers {
// building feature in shared code and in projects
projectNames = sanitizeCommaDelimitedArg(projects);
for (const name of projectNames) {
const platPrefix = <PlatformTypes>name.split('-')[0];
const projectParts = name.split('-');
const platPrefix = <PlatformTypes>projectParts[0];
const platSuffix = <PlatformTypes>projectParts.pop();
if (
supportedPlatforms.includes(platPrefix) &&
!platforms.includes(platPrefix)
) {
// if project name is prefixed with supported platform and not already added
platforms.push(platPrefix);
} else if (
supportedPlatforms.includes(platSuffix) &&
!platforms.includes(platSuffix)
) {
// if project name is suffixed with supported platform and not already added
platforms.push(platSuffix);
}
}
} else if (options.platforms) {
Expand Down

0 comments on commit fb8d096

Please sign in to comment.