Skip to content

Commit

Permalink
Add default watch config to generated target to make it easier to run…
Browse files Browse the repository at this point in the history
… watch mode
  • Loading branch information
eddeee888 committed May 15, 2022
1 parent 3e87b99 commit 5fdaa81
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ describe('nx-graphql-code-generator:add e2e', () => {
configFile: `libs/${plugin}/graphql-codegen.yml`,
watch: false,
},
configurations: {
watch: {
watch: true,
},
},
});

// check package.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ describe('nx-graphql-code-generator generator', () => {
configFile: `libs/${projectName}/codegen.yml`,
watch: false,
},
configurations: {
watch: {
watch: true,
},
},
});

// files
Expand Down Expand Up @@ -89,6 +94,11 @@ describe('nx-graphql-code-generator generator', () => {
configFile: `apps/${directory}/${projectName}/codegen.yml`,
watch: false,
},
configurations: {
watch: {
watch: true,
},
},
});

// files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ function upsertGraphqlCodegenTask(tree: Tree, options: NormalizedSchema) {
configFile: path.join(options.projectConfig.root, options.config),
watch: false,
},
configurations: {
watch: {
watch: true,
},
},
};

updateProjectConfiguration(tree, options.projectName, options.projectConfig);
Expand Down

0 comments on commit 5fdaa81

Please sign in to comment.