Created
January 26, 2023 05:46
-
-
Save ZackDeRose/9bdfe23ce431292cb5f1d2483948b0fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getWorkspaceLayout, names, Tree, updateJson } from '@nrwl/devkit' | |
// ... | |
function adjustDefaultDevPort(tree: Tree, options: AppGeneratorSchema) { | |
const { fileName } = names(options.name); | |
updateJson(tree, `apps/${fileName}-web/project.json`, (json) => ({ | |
...json, | |
targets: { | |
...json.targets, | |
serve: { | |
...json.targets.serve, | |
options: { | |
...json.targets.serve.options, | |
port: options.frontendPort, | |
}, | |
}, | |
}, | |
})); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment