pnpm
PnpmSetupSummary
¶
create_symlink(link, source)
¶
Create a symlink that is linked to a source.
This is a destructive operation - if the link exists it will be removed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
link |
Path
|
The path to the link. |
required |
source |
Path
|
The path to the source. |
required |
Source code in m/devcontainer/pnpm.py
pnpm_setup(work_dir, pnpm_dir)
¶
Create symbolic links to a mounted volume.
This is done so that pnpm may take advantage of the cache associated with
a single pnpm store. When we execute pnpm install
in the devcontainer
we want to make sure that other containers may be able to share the pnpm
cache. To do this we need all containers to use the same pnpm store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
work_dir |
str
|
The directory where the project is mounted. |
required |
pnpm_dir |
str
|
The directory where the project will execute pnpm commands. |
required |
Returns:
Type | Description |
---|---|
Res[None]
|
A |
Source code in m/devcontainer/pnpm.py
run_pnpm(pnpm_args, *, force_cd)
¶
Execute the pnpm command with the given arguments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pnpm_args |
list[str]
|
The arguments to pass to pnpm. |
required |
force_cd |
bool
|
If True, change the working directory to the mounted volume. |
required |
Returns:
Type | Description |
---|---|
Res[None]
|
The exit code of the pnpm command. |