Skip to content

Commit

Permalink
fix: ignore demos without tsconfig's
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Jan 15, 2025
1 parent eb540c0 commit 2ceb760
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/plugin-tools/src/utils/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export function updateDemoDependencies(tree: Tree, type: SupportedDemoType, demo
}

tree.write(packagePath, serializeJson(packageData));
tree.write(tsconfigPath, serializeJson(tsconfig));
if (tsconfig) {
tree.write(tsconfigPath, serializeJson(tsconfig));
}
}
}

Expand Down Expand Up @@ -158,7 +160,7 @@ export function getDemoFlavorExt(type: SupportedDemoType) {

export function getDemoIndexButtonForType(
type: SupportedDemoType,
packageName: string
packageName: string,
): {
buttonStart: string;
buttonTap: string;
Expand Down
5 changes: 4 additions & 1 deletion packages/plugin-tools/src/utils/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export function getPackageNamesToUpdate(): Array<string> {
}

export function getJsonFromFile(tree: Tree, path: string) {
return readJson(tree, path);
if (tree.exists(path)) {
return readJson(tree, path);
}
return null;
}

export function jsonParse(content: string) {
Expand Down

0 comments on commit 2ceb760

Please sign in to comment.