Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/site/snippets/en/download/asdf.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# asdf has specific installation instructions for each operating system.
# Please refer to the official documentation at https://asdf-vm.com/guide/getting-started.html.

# Install the Node.js plugin
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git

# Download and install Node.js ${props.release.version}
asdf install nodejs ${props.release.version}

# Set global Node.js version to ${props.release.version}
asdf set -u nodejs ${props.release.version}
3 changes: 2 additions & 1 deletion apps/site/types/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export type InstallationMethod =
| 'BREW'
| 'DOCKER'
| 'CHOCO'
| 'N';
| 'N'
| 'ASDF';
export type PackageManager = 'NPM' | 'YARN' | 'PNPM';

// Items with a pipe/default value mean that they are auto inferred
Expand Down
9 changes: 9 additions & 0 deletions apps/site/util/download/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@
},
"url": "https://github.com/tj/n",
"info": "layouts.download.codeBox.platformInfo.n"
},
{
"id": "ASDF",
"name": "asdf",
"compatibility": {
"os": ["MAC", "LINUX"]
},
"url": "https://asdf-vm.com/guide/getting-started.html",
"info": "layouts.download.codeBox.platformInfo.asdf"
}
],
"packageManagers": [
Expand Down
4 changes: 3 additions & 1 deletion apps/site/util/download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ export const parseCompat = <
*/
const createIcon = (
IconModule: Record<string, ElementType>,
iconName: string
iconName?: string
) => {
if (!iconName) {return undefined;}
const IconComponent = IconModule[iconName];
if (!IconComponent) {return undefined;}
return <IconComponent width={16} height={16} />;
};

Expand Down
3 changes: 2 additions & 1 deletion packages/i18n/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@
"choco": "Chocolatey is a package manager for Windows.",
"docker": "Docker is a containerization platform.",
"n": "\"n\" is a cross-platform Node.js version manager.",
"volta": "\"Volta\" is a cross-platform Node.js version manager."
"volta": "\"Volta\" is a cross-platform Node.js version manager.",
"asdf": "\"asdf\" is a cross-platform version manager that supports multiple languages."
}
}
},
Expand Down
Loading