Nx: Add a command to remove an app from the workspace.

Created on 7 Jan 2020  路  4Comments  路  Source: nrwl/nx

Prerequisites

Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • [x ] I am running the latest version
  • [ x] I checked the documentation (nx.dev) and found no answer
  • [ x] I checked to make sure that this issue has not already been filed
  • [x ] I'm reporting the issue to the correct repository (not related to React, Angular or any dependency)

Expected Behavior

Be able to run a command like nx remove @nrwl/react:application myapp to completely remove an application/library from the workspace.

Current Behavior

No documented way to remove an app/lib from the wrokspace.

Context

Please provide any relevant information about your setup:

  • version of Nx used: 8.9.0
misc feature

Most helpful comment

The remove schematic has now been added! :tada: Please give it a try!

ng g @nrwl/workspace:remove project-name

All 4 comments

The move command has been introduced to help refactoring a workspace.

nx g @nrwl/workspace:move --projectName my-feature-lib --destination shared/my-feature-lib

Does this help in regards to removing a project from it?

The remove schematic has now been added! :tada: Please give it a try!

ng g @nrwl/workspace:remove project-name

How do you specify the workspace name and the application or library name? What does project-name mean? I tried this and it keeps giving me this error whether i'm in the workspace directory or not:

"The generate command requires to be run in an Angular project, but a project definition could not be found."

The workspace was generated as a react workspace - not sure why it says Angular

NVM - this is how you do it: nx g @nrwl/workspace:remove my-feature-lib

Was this page helpful?
0 / 5 - 0 ratings