Skip to content

Commit

Permalink
fix: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Jun 7, 2023
1 parent fb58c1a commit c8419f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/nx-plugin/src/generators/target/generator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ describe('target generator', () => {
},
}
);
writeJson(appTree, join(normalizedOptions.projectRoot, '.user-flowrc.json'), {});
});

it('should run successfully', async () => {
Expand Down
5 changes: 3 additions & 2 deletions packages/nx-plugin/src/generators/target/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {getWorkspaceLayout, logger, readJson, Tree, updateJson, writeJson} from "@nrwl/devkit";
import {getWorkspaceLayout, logger, Tree, updateJson, writeJson} from "@nrwl/devkit";
import {TargetGeneratorSchema} from "./schema";
import {join} from "path";
import {existsSync} from "fs";
import {NormalizedSchema} from "./types";
import {DEFAULT_TARGET_NAME} from "../constants";

Expand All @@ -19,7 +20,7 @@ export function normalizeOptions(tree: Tree, options?: TargetGeneratorSchema): N
export function setupUserFlow(tree: Tree, cfg: NormalizedSchema): void {
const {projectName, targetName, projectRoot, verbose} = cfg;
logger.log(`Adding .user-flowrc.json to project`);
const existing = readJson(tree, join(projectRoot, '.user-flowrc.json'));
const existing = existsSync(join(projectRoot, '.user-flowrc.json'));
if (!existing) {
writeJson(tree, join(projectRoot, '.user-flowrc.json'), {});
} else {
Expand Down

0 comments on commit c8419f4

Please sign in to comment.