@webundsoehne/nx-workspace
v6.0.0
Published
Workspace plugin for Nx
Downloads
126
Readme
@webundsoehne/nx-workspace
Description
This package includes the preset of a nx workspace. This can be used with the npx create-nx-workspace command.
Generators
Workspace
Workspace is defined as preset generator that can be called as --preset @webundsoehne/nx-workspace through the create-nx-workspace (or generate) command.
# via create-nx-workspace
npx create-nx-workspace --ci=skip --preset=@webunsoehne/nx-workspace
# with generate inside an existing nx-workspace
nx generate @webunsoehne/nx-workspace:workspaceMove
Move a project to a new destination. Extends the @nx/workspace:move generator, but adds more user interaction and better rename support. i.e. Renaming a project is possible without setting the full destination path
# interactive mode
nx generate @webunsoehne/nx-workspace:move
# quick rename
nx generate @webunsoehne/nx-workspace:move [old-name] [new-name]
# equivalent in interactive mode:
# nx generate @lib/gen:move
#
#✔ Which project should be moved? · [old-name]
#✔ Where should the project be moved to? · [new-name]
# move to different folder
nx generate @webunsoehne/nx-workspace:move [name] folder/path/[name]Remove
Remove a project from the workspace. Extends the @nx/workspace:remove generator, but adds more user interaction. (Use --force to remove a project even if still in use by other projects.)
# interactive mode
nx generate @webunsoehne/nx-workspace:remove
# cli mode
nx generate @webunsoehne/nx-workspace:remove [name] --forceLibrary
Adds a new library to the workspace. Simple empty library with optional jest setup. (Use --skipPackageJson to skip adding jest packages as devDependencies)
# interactive mode
nx generate @webunsoehne/nx-workspace:library
nx generate @webunsoehne/nx-workspace:lib
# setup with jest
nx generate @webunsoehne/nx-workspace:library [name] --jest