-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Copy files. * Add section. * Update sveltekit.
- Loading branch information
Showing
6 changed files
with
660 additions
and
81 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
<Tabs | ||
groupId="package-manager" | ||
defaultValue="yarn" | ||
values={[ | ||
{ label: 'npm', value: 'npm' }, | ||
{ label: 'pnpm', value: 'pnpm' }, | ||
{ label: 'Yarn', value: 'yarn' }, | ||
{ label: 'Yarn (classic)', value: 'yarn1' }, | ||
]} | ||
> | ||
<TabItem value="yarn"> | ||
|
||
```json title="package.json" | ||
{ | ||
// ... | ||
"workspaces": ["apps/*", "packages/*"] | ||
} | ||
``` | ||
|
||
```yaml title=".yarnrc.yml" | ||
# ... | ||
nodeLinker: 'node-modules' | ||
``` | ||
- [Documentation](https://yarnpkg.com/features/workspaces) | ||
</TabItem> | ||
<TabItem value="yarn1"> | ||
```json title="package.json" | ||
{ | ||
// ... | ||
"workspaces": ["apps/*", "packages/*"] | ||
} | ||
``` | ||
|
||
- [Documentation](https://classic.yarnpkg.com/en/docs/workspaces) | ||
|
||
</TabItem> | ||
<TabItem value="npm"> | ||
|
||
```json title="package.json" | ||
{ | ||
// ... | ||
"workspaces": ["apps/*", "packages/*"] | ||
} | ||
``` | ||
|
||
- [Documentation](https://docs.npmjs.com/cli/v8/using-npm/workspaces) | ||
|
||
</TabItem> | ||
<TabItem value="pnpm"> | ||
|
||
```yaml title="pnpm-workspace.yaml" | ||
packages: | ||
- 'apps/*' | ||
- 'packages/*' | ||
``` | ||
|
||
- [Documentation](https://pnpm.io/workspaces) | ||
|
||
</TabItem> | ||
</Tabs> |
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
154 changes: 154 additions & 0 deletions
154
website/docs/guides/javascript/__partials__/workspace-commands.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
<Tabs | ||
groupId="package-manager" | ||
defaultValue="yarn" | ||
values={[ | ||
{ label: 'npm', value: 'npm' }, | ||
{ label: 'pnpm', value: 'pnpm' }, | ||
{ label: 'Yarn', value: 'yarn' }, | ||
{ label: 'Yarn (classic)', value: 'yarn1' }, | ||
]} | ||
> | ||
<TabItem value="npm"> | ||
|
||
Install dependencies: | ||
|
||
```shell | ||
npm install | ||
``` | ||
|
||
Add a package: | ||
|
||
```shell | ||
# At the root | ||
npm install <dependency> | ||
|
||
# In a project | ||
npm install <dependency> --workspace <project> | ||
``` | ||
|
||
Remove a package: | ||
|
||
```shell | ||
# At the root | ||
npm install <dependency> | ||
|
||
# In a project | ||
npm install <dependency> --workspace <project> | ||
``` | ||
|
||
Update packages: | ||
|
||
```shell | ||
npx npm-check-updates --interactive | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="pnpm"> | ||
|
||
Install dependencies: | ||
|
||
```shell | ||
pnpm install | ||
``` | ||
|
||
Add a package: | ||
|
||
```shell | ||
# At the root | ||
pnpm add <dependency> | ||
|
||
# In a project | ||
pnpm add <dependency> --filter <project> | ||
``` | ||
|
||
Remove a package: | ||
|
||
```shell | ||
# At the root | ||
pnpm remove <dependency> | ||
|
||
# In a project | ||
pnpm remove <dependency> --filter <project> | ||
``` | ||
|
||
Update packages: | ||
|
||
```shell | ||
pnpm update -i -r --latest | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="yarn"> | ||
|
||
Install dependencies: | ||
|
||
```shell | ||
yarn install | ||
``` | ||
|
||
Add a package: | ||
|
||
```shell | ||
# At the root | ||
yarn add <dependency> | ||
|
||
# In a project | ||
yarn workspace <project> add <dependency> | ||
``` | ||
|
||
Remove a package: | ||
|
||
```shell | ||
# At the root | ||
yarn remove <dependency> | ||
|
||
# In a project | ||
yarn workspace <project> remove <dependency> | ||
``` | ||
|
||
Update packages: | ||
|
||
```shell | ||
yarn upgrade-interactive | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="yarn1"> | ||
|
||
Install dependencies: | ||
|
||
```shell | ||
yarn install | ||
``` | ||
|
||
Add a package: | ||
|
||
```shell | ||
# At the root | ||
yarn add <dependency> -w | ||
|
||
# In a project | ||
yarn workspace <project> add <dependency> | ||
``` | ||
|
||
Remove a package: | ||
|
||
```shell | ||
# At the root | ||
yarn remove <dependency> -w | ||
|
||
# In a project | ||
yarn workspace <project> remove <dependency> | ||
``` | ||
|
||
Update packages: | ||
|
||
```shell | ||
yarn upgrade-interactive --latest | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
Oops, something went wrong.