nx/docs/react/api-workspace/generators/convert-to-nx-project.md
Craigory V Coppola 7c7191a2f9
docs(core): docs for project.json files + associated generator (#6107)
Signed-off-by: AgentEnder <craigorycoppola@gmail.com>
2021-06-28 10:20:11 -04:00

52 lines
917 B
Markdown

# convert-to-nx-project
Moves a project's configuration outside of workspace.json
## Usage
```bash
nx generate convert-to-nx-project ...
```
By default, Nx will search for `convert-to-nx-project` in the default collection provisioned in `workspace.json`.
You can specify the collection explicitly as follows:
```bash
nx g @nrwl/workspace:convert-to-nx-project ...
```
Show what will be generated without writing to disk:
```bash
nx g convert-to-nx-project ... --dry-run
```
### Examples
Convert the my-feature-lib project to use project.json file instead of workspace.json:
```bash
nx g @nrwl/workspace:convert-to-nx-project --project my-feature-lib
```
Convert all projects in workspace.json to separate project.json files.:
```bash
nx g @nrwl/workspace:convert-to-nx-project --all
```
## Options
### all
Type: `boolean`
Should every project be converted?
### project
Type: `string`
Project name