diff options
| author | 2023-04-28 01:36:44 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:44 +0800 | |
| commit | dd84b9d64fb98746a230cd24233ff50a562c39c9 (patch) | |
| tree | b583261ef00b3afe72ec4d6dacb31e57779a6faf /packages/turbo-workspaces/README.md | |
| parent | 0b46fcd72ac34382387b2bcf9095233efbcc52f4 (diff) | |
| download | HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.tar.gz HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.zip | |
Diffstat (limited to 'packages/turbo-workspaces/README.md')
| -rw-r--r-- | packages/turbo-workspaces/README.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/packages/turbo-workspaces/README.md b/packages/turbo-workspaces/README.md new file mode 100644 index 0000000..60d8024 --- /dev/null +++ b/packages/turbo-workspaces/README.md @@ -0,0 +1,49 @@ +# `@turbo/workspaces` + +Easily convert your repo between package managers. Supports both non-monorepos and monorepos (using package manager workspaces). + +## CLI + +```sh +Usage: @turbo/workspaces [options] [command] + +Tools for working with package manager workspaces + +Options: + -v, --version output the current version + -h, --help display help for command + +Commands: + convert [options] [path] [package-manager] Convert project between workspace managers + summary [path] Display a summary of the specified project + help [command] display help for command +``` + +## Node API + +Methods are also available via the Node API: + +```js +import { convert, getWorkspaceDetails } from "@turbo/workspaces"; + +// detect the package manager +const project = getWorkspaceDetails({ + root: process.cwd(), +}); + +// if the package manager is not pnpm, convert to pnpm +if (project.packageManager !== "pnpm") { + await convert({ + root: process.cwd(), + to: "pnpm", + options: { + dry: false, + install: true, + }, + }); +} +``` + +--- + +For more information about Turborepo, visit [turbo.build/repo](https://turbo.build/repo) and follow us on Twitter ([@turborepo](https://twitter.com/turborepo))! |
