mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
docs: migrate to VitePress from VuePress (#1578)
This commit is contained in:
parent
816195d615
commit
5133819a77
10
.github/workflows/documentation.yml
vendored
10
.github/workflows/documentation.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "16"
|
||||
node-version: "20"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v3
|
||||
@ -42,18 +42,18 @@ jobs:
|
||||
if: steps.npm-cache.outputs.cache-hit != 'true'
|
||||
run: npm install
|
||||
|
||||
- name: Build VuePress site
|
||||
- name: Build VitePress site
|
||||
run: npm run build
|
||||
|
||||
- name: Bundle CNAME with site dist
|
||||
run: cp CNAME .vuepress/dist
|
||||
run: cp CNAME .vitepress/dist
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: crazy-max/ghaction-github-pages@v3
|
||||
with:
|
||||
# deploy to gh-pages branch
|
||||
target_branch: gh-pages
|
||||
# deploy the default output dir of VuePress
|
||||
build_dir: docs/.vuepress/dist
|
||||
# deploy the default output dir of VitePress
|
||||
build_dir: docs/.vitepress/dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
4
docs/.gitignore
vendored
4
docs/.gitignore
vendored
@ -1,3 +1,7 @@
|
||||
### Custom ###
|
||||
# VitePress build output & cache directory
|
||||
.vitepress/cache
|
||||
.vitepress/dist
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/node
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
||||
|
6
docs/.prettierignore
Normal file
6
docs/.prettierignore
Normal file
@ -0,0 +1,6 @@
|
||||
# VitePress build output & cache directory
|
||||
.vitepress/cache
|
||||
.vitepress/dist
|
||||
node_modules
|
||||
package.json
|
||||
package-lock.json
|
@ -1 +1 @@
|
||||
nodejs 18.12.1
|
||||
nodejs 20.2.0
|
||||
|
46
docs/.vitepress/config.ts
Normal file
46
docs/.vitepress/config.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
import * as navbars from "./navbars";
|
||||
import * as sidebars from "./sidebars";
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
title: "asdf",
|
||||
description: "Manage multiple runtime versions with a single CLI tool",
|
||||
lastUpdated: true,
|
||||
locales: {
|
||||
root: {
|
||||
label: "English",
|
||||
lang: "en-US",
|
||||
themeConfig: {
|
||||
nav: navbars.en,
|
||||
sidebar: sidebars.en,
|
||||
},
|
||||
},
|
||||
"pt-br": {
|
||||
label: "Brazilian Portuguese",
|
||||
lang: "pr-br",
|
||||
themeConfig: {
|
||||
nav: navbars.pt_br,
|
||||
sidebar: sidebars.pt_br,
|
||||
},
|
||||
},
|
||||
"zh-hans": {
|
||||
label: "简体中文",
|
||||
lang: "zh-hans",
|
||||
themeConfig: {
|
||||
nav: navbars.zh_hans,
|
||||
sidebar: sidebars.zh_hans,
|
||||
},
|
||||
},
|
||||
},
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
socialLinks: [
|
||||
{ icon: "github", link: "https://github.com/asdf-vm/asdf" },
|
||||
// { icon: "twitter", link: "https://twitter.com/asdf_vm" },
|
||||
],
|
||||
},
|
||||
});
|
71
docs/.vitepress/navbars.ts
Normal file
71
docs/.vitepress/navbars.ts
Normal file
@ -0,0 +1,71 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import process from "process";
|
||||
|
||||
export const getVersion = () => {
|
||||
const versionFilepath = path.join(__dirname, "../../version.txt");
|
||||
try {
|
||||
const version = fs.readFileSync(versionFilepath, "utf8").trim();
|
||||
console.log(`Found version ${version} from ${versionFilepath}`);
|
||||
return version;
|
||||
} catch (error) {
|
||||
console.error(`Failed to find version from file ${versionFilepath}`, error);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
const en = [
|
||||
{ text: "Guide", link: "/guide/getting-started" },
|
||||
{
|
||||
text: "Reference",
|
||||
link: "/manage/configuration",
|
||||
},
|
||||
{
|
||||
text: getVersion(),
|
||||
items: [
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
{ text: "Contribute", link: "/contribute/core" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const pt_br = [
|
||||
{ text: "Guia", link: "/pt-br/guide/getting-started" },
|
||||
{
|
||||
text: "Referência",
|
||||
link: "/pt-br/manage/configuration",
|
||||
},
|
||||
{
|
||||
text: getVersion(),
|
||||
items: [
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
{ text: "Contribute", link: "/pt-br/contribute/core" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const zh_hans = [
|
||||
{ text: "指导", link: "/zh-hans/guide/getting-started" },
|
||||
{
|
||||
text: "参考",
|
||||
link: "/zh-hans/manage/configuration",
|
||||
},
|
||||
{
|
||||
text: getVersion(),
|
||||
items: [
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
{ text: "如何贡献", link: "/zh-hans/contribute/core" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export { en, pt_br, zh_hans };
|
337
docs/.vitepress/sidebars.ts
Normal file
337
docs/.vitepress/sidebars.ts
Normal file
@ -0,0 +1,337 @@
|
||||
const en = [
|
||||
{
|
||||
text: "Guide",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "What is asdf?", link: "/guide/introduction" },
|
||||
{ text: "Getting Started", link: "/guide/getting-started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Usage",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "Core", link: "/manage/core" },
|
||||
{ text: "Plugins", link: "/manage/plugins" },
|
||||
{ text: "Versions", link: "/manage/versions" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "Configuration", link: "/manage/configuration" },
|
||||
{ text: "All Commands", link: "/manage/commands" },
|
||||
{
|
||||
text: "Plugin Shortname Index",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plugins",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "Authors",
|
||||
items: [
|
||||
{ text: "Create a Plugin", link: "/plugins/create" },
|
||||
{
|
||||
text: "GitHub Plugin Template",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "First Party Plugins",
|
||||
items: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community Plugins",
|
||||
items: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
{
|
||||
text: "GitHub Topics Search",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Questions",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "FAQ", link: "/more/faq" },
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "Stack Overflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Contribute",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Core asdf", link: "/contribute/core" },
|
||||
{ text: "Documentation", link: "/contribute/documentation" },
|
||||
{
|
||||
text: "First-Party Plugins",
|
||||
link: "/contribute/first-party-plugins",
|
||||
},
|
||||
{ text: "GitHub Actions", link: "/contribute/github-actions" },
|
||||
],
|
||||
},
|
||||
{ text: "Community Projects", link: "/more/community-projects" },
|
||||
{ text: "Thanks", link: "/more/thanks" },
|
||||
];
|
||||
|
||||
const pt_br = [
|
||||
{
|
||||
text: "Guia",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "O que é asdf?", link: "/pt-br/guide/introduction" },
|
||||
{ text: "Começar", link: "/pt-br/guide/getting-started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Uso",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "Essencial", link: "/pt-br/manage/core" },
|
||||
{ text: "Plugins", link: "/pt-br/manage/plugins" },
|
||||
{ text: "Versões", link: "/pt-br/manage/versions" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Referência",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "Configuração", link: "/pt-br/manage/configuration" },
|
||||
{ text: "Todos os comandos", link: "/pt-br/manage/commands" },
|
||||
{
|
||||
text: "Plugin Shortname Index",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plugins",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "Autoria",
|
||||
items: [
|
||||
{ text: "Criar um plug-in", link: "/pt-br/plugins/create" },
|
||||
{
|
||||
text: "GitHub Plugin Template",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plug-ins Próprios",
|
||||
items: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plug-ins da Comunidade",
|
||||
items: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
{
|
||||
text: "GitHub Topics Search",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Questões",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Perguntas Frequentes", link: "/pt-br/more/faq" },
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "Stack Overflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Contribute",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Essencial asdf", link: "/pt-br/contribute/core" },
|
||||
{ text: "Documentação", link: "/pt-br/contribute/documentation" },
|
||||
{
|
||||
text: "Plug-ins Próprios",
|
||||
link: "/pt-br/contribute/first-party-plugins",
|
||||
},
|
||||
{ text: "GitHub Actions", link: "/pt-br/contribute/github-actions" },
|
||||
],
|
||||
},
|
||||
{ text: "Projetos Comunitários", link: "/pt-br/more/community-projects" },
|
||||
{ text: "Créditos", link: "/pt-br/more/thanks" },
|
||||
];
|
||||
|
||||
const zh_hans = [
|
||||
{
|
||||
text: "指导",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "什么是asdf?", link: "/zh-hans/guide/introduction" },
|
||||
{ text: "快速入门", link: "/zh-hans/guide/getting-started" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "用法",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "核心", link: "/zh-hans/manage/core" },
|
||||
{ text: "插件", link: "/zh-hans/manage/plugins" },
|
||||
{ text: "版本", link: "/zh-hans/manage/versions" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "参考",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "配置", link: "/zh-hans/manage/configuration" },
|
||||
{ text: "所有命令", link: "/zh-hans/manage/commands" },
|
||||
{
|
||||
text: "插件缩写索引",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "插件",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "成为作者",
|
||||
items: [
|
||||
{ text: "创建插件", link: "/zh-hans/plugins/create" },
|
||||
{
|
||||
text: "GitHub 插件模板",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "官方插件",
|
||||
items: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "社区插件",
|
||||
items: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
{
|
||||
text: "GitHub 主题搜索",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "问题",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "经常问的问题", link: "/zh-hans/more/faq" },
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "Stack Overflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "如何贡献",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "核心", link: "/zh-hans/contribute/core" },
|
||||
{ text: "文档", link: "/zh-hans/contribute/documentation" },
|
||||
{
|
||||
text: "官方插件",
|
||||
link: "/zh-hans/contribute/first-party-plugins",
|
||||
},
|
||||
{ text: "GitHub Actions", link: "/zh-hans/contribute/github-actions" },
|
||||
],
|
||||
},
|
||||
{ text: "社区项目", link: "/zh-hans/more/community-projects" },
|
||||
{ text: "致谢", link: "/zh-hans/more/thanks" },
|
||||
];
|
||||
|
||||
export { en, pt_br, zh_hans };
|
13
docs/.vitepress/theme/custom.css
Normal file
13
docs/.vitepress/theme/custom.css
Normal file
@ -0,0 +1,13 @@
|
||||
:root {
|
||||
--vp-c-brand: #b744b8;
|
||||
--vp-c-brand-light: #a379c9;
|
||||
--vp-c-brand-lighter: #a379c9; /* TODO: change this colour to be lighter */
|
||||
--vp-c-brand-dark: #a379c9;
|
||||
--vp-c-brand-darker: #a379c9; /* TODO: change this colour to be lighter */
|
||||
/* tip container */
|
||||
/* TODO: change these css vars to be correct */
|
||||
--vp-c-tip: #0070f3;
|
||||
--vp-c-tip-bg: #e3eeff;
|
||||
--vp-c-tip-title: #004bad;
|
||||
--vp-c-tip-text: #002974;
|
||||
}
|
4
docs/.vitepress/theme/index.ts
Normal file
4
docs/.vitepress/theme/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import DefaultTheme from "vitepress/theme";
|
||||
import "./custom.css";
|
||||
|
||||
export default DefaultTheme;
|
@ -1,85 +0,0 @@
|
||||
import { defaultTheme, defineUserConfig } from "vuepress";
|
||||
import { searchPlugin } from "@vuepress/plugin-search";
|
||||
import { shikiPlugin } from "@vuepress/plugin-shiki";
|
||||
import { activeHeaderLinksPlugin } from "@vuepress/plugin-active-header-links";
|
||||
|
||||
import navbar from "./navbar";
|
||||
import sidebar from "./sidebar";
|
||||
|
||||
export default defineUserConfig({
|
||||
base: "/",
|
||||
head: [],
|
||||
locales: {
|
||||
"/": {
|
||||
lang: "en-US",
|
||||
title: "asdf",
|
||||
description: "Manage multiple runtime versions with a single CLI tool",
|
||||
},
|
||||
"/pt-br/": {
|
||||
lang: "pt-br",
|
||||
title: "asdf",
|
||||
description: "Gerencie múltiplas versões com um simples CLI",
|
||||
},
|
||||
"/zh-hans/": {
|
||||
lang: "zh-CN",
|
||||
title: "asdf",
|
||||
description: "管理多个运行环境版本的简单命令行工具",
|
||||
},
|
||||
},
|
||||
|
||||
theme: defaultTheme({
|
||||
// logo: "https://vuejs.org/images/logo.png",
|
||||
repo: "asdf-vm/asdf",
|
||||
docsBranch: "master",
|
||||
docsDir: "docs",
|
||||
locales: {
|
||||
"/": {
|
||||
selectLanguageName: "English",
|
||||
sidebar: sidebar.en,
|
||||
navbar: navbar.en,
|
||||
editLinkText: "Edit this page",
|
||||
},
|
||||
"/pt-br/": {
|
||||
selectLanguageName: "Brazilian Portuguese",
|
||||
sidebar: sidebar.pt_br,
|
||||
navbar: navbar.pt_br,
|
||||
editLinkText: "Edit this page",
|
||||
|
||||
// 404 page
|
||||
notFound: ["Parece que estamos perdido!"],
|
||||
backToHome: "Voltar para a página inicial",
|
||||
},
|
||||
"/zh-hans/": {
|
||||
selectLanguageName: "简体中文",
|
||||
selectLanguageText: "选择语言",
|
||||
sidebar: sidebar.zh_hans,
|
||||
navbar: navbar.zh_hans,
|
||||
editLinkText: "在 GitHub 编辑此页面",
|
||||
|
||||
// 404 page
|
||||
notFound: ["抱歉,您访问的页面不存在!"],
|
||||
backToHome: "返回首页",
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
||||
plugins: [
|
||||
activeHeaderLinksPlugin(),
|
||||
searchPlugin({
|
||||
locales: {
|
||||
"/": {
|
||||
placeholder: "Search",
|
||||
},
|
||||
"/pt-br/": {
|
||||
placeholder: "Search",
|
||||
},
|
||||
"/zh-hans/": {
|
||||
placeholder: "搜索",
|
||||
},
|
||||
},
|
||||
}),
|
||||
shikiPlugin({
|
||||
theme: "monokai",
|
||||
}),
|
||||
],
|
||||
});
|
@ -1,417 +0,0 @@
|
||||
const en = [
|
||||
{
|
||||
text: "Introduction",
|
||||
link: "/guide/introduction.html",
|
||||
activeMatch: "/guide/introduction",
|
||||
},
|
||||
{
|
||||
text: "Getting Started",
|
||||
link: "/guide/getting-started.html",
|
||||
activeMatch: "/guide/getting-started",
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
children: [
|
||||
{
|
||||
text: "Manage",
|
||||
children: [
|
||||
"/manage/core.md",
|
||||
"/manage/plugins.md",
|
||||
"/manage/versions.md",
|
||||
"/manage/configuration.md",
|
||||
"/manage/commands.md",
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "Author",
|
||||
children: [
|
||||
"/plugins/create.md",
|
||||
{
|
||||
text: "GitHub Plugin Template",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "First Party Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
{
|
||||
text: "GitHub Topics Search",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
children: [
|
||||
{
|
||||
text: "Plugin Shortname Index",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Contribute",
|
||||
children: [
|
||||
{
|
||||
text: "Core",
|
||||
children: ["/contribute/core.md", "/contribute/documentation.md"],
|
||||
},
|
||||
{
|
||||
text: "Plugins",
|
||||
children: ["/contribute/first-party-plugins.md"],
|
||||
},
|
||||
{
|
||||
text: "CICD",
|
||||
children: ["/contribute/github-actions.md"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "More",
|
||||
children: [
|
||||
{
|
||||
text: "Questions",
|
||||
children: [
|
||||
"/more/faq.md",
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "StackOverflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
"/more/community-projects.md",
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Resources",
|
||||
children: ["/more/thanks.md"],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const pt_br = [
|
||||
{
|
||||
text: "Getting Started",
|
||||
link: "/pt-br/guide/getting-started.html",
|
||||
activeMatch: "/pt-br/guide/",
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
children: [
|
||||
{
|
||||
text: "Manage",
|
||||
children: [
|
||||
"/pt-br/manage/core.md",
|
||||
"/pt-br/manage/plugins.md",
|
||||
"/pt-br/manage/versions.md",
|
||||
"/pt-br/manage/configuration.md",
|
||||
"/pt-br/manage/commands.md",
|
||||
{
|
||||
text: "Alterações",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "Author",
|
||||
children: [
|
||||
"/pt-br/plugins/create.md",
|
||||
{
|
||||
text: "GitHub Plugin Template",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "First Party Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
{
|
||||
text: "GitHub Topics Search",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
children: [
|
||||
{
|
||||
text: "Plugin Shortname Index",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Contribute",
|
||||
children: [
|
||||
{
|
||||
text: "Core",
|
||||
children: [
|
||||
"/pt-br/contribute/core.md",
|
||||
"/pt-br/contribute/documentation.md",
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Plugins",
|
||||
children: ["/pt-br/contribute/first-party-plugins.md"],
|
||||
},
|
||||
{
|
||||
text: "CICD",
|
||||
children: ["/pt-br/contribute/github-actions.md"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "More",
|
||||
children: [
|
||||
{
|
||||
text: "Questions",
|
||||
children: [
|
||||
"/pt-br/more/faq.md",
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "StackOverflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
"/pt-br/more/community-projects.md",
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Resources",
|
||||
children: ["/pt-br/more/thanks.md"],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const zh_hans = [
|
||||
{
|
||||
text: "快速上手",
|
||||
link: "/zh-hans/guide/getting-started.html",
|
||||
activeMatch: "/zh-hans/guide/",
|
||||
},
|
||||
{
|
||||
text: "参考",
|
||||
children: [
|
||||
{
|
||||
text: "管理",
|
||||
children: [
|
||||
"/zh-hans/manage/core.md",
|
||||
"/zh-hans/manage/plugins.md",
|
||||
"/zh-hans/manage/versions.md",
|
||||
"/zh-hans/manage/configuration.md",
|
||||
"/zh-hans/manage/commands.md",
|
||||
{
|
||||
text: "更新日志",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "插件",
|
||||
children: [
|
||||
{
|
||||
text: "成为作者",
|
||||
children: [
|
||||
"/zh-hans/plugins/create.md",
|
||||
{
|
||||
text: "插件模板",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "官方插件",
|
||||
children: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "社区插件",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
{
|
||||
text: "GitHub 主题搜索",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "参考",
|
||||
children: [
|
||||
{
|
||||
text: "插件缩写索引",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "如何贡献",
|
||||
children: [
|
||||
{
|
||||
text: "核心",
|
||||
children: [
|
||||
"/zh-hans/contribute/core.md",
|
||||
"/zh-hans/contribute/documentation.md",
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "插件",
|
||||
children: ["/zh-hans/contribute/first-party-plugins.md"],
|
||||
},
|
||||
{
|
||||
text: "持续集成/持续部署",
|
||||
children: ["/zh-hans/contribute/github-actions.md"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "更多的",
|
||||
children: [
|
||||
{
|
||||
text: "提问",
|
||||
children: [
|
||||
"/zh-hans/more/faq.md",
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "StackOverflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community",
|
||||
},
|
||||
"/zh-hans/more/community-projects.md",
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Resources",
|
||||
children: ["/zh-hans/more/thanks.md"],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default { en, pt_br, zh_hans };
|
@ -1,320 +0,0 @@
|
||||
const en = {
|
||||
"/guide/": ["/guide/introduction.md", "/guide/getting-started.md"],
|
||||
"/manage/": [
|
||||
{
|
||||
text: "Manage",
|
||||
children: [
|
||||
"/manage/core.md",
|
||||
"/manage/plugins.md",
|
||||
"/manage/versions.md",
|
||||
"/manage/configuration.md",
|
||||
"/manage/commands.md",
|
||||
{
|
||||
text: "Changelog",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"/plugins/": [
|
||||
{
|
||||
text: "Author",
|
||||
children: [
|
||||
"/plugins/create.md",
|
||||
{
|
||||
text: "GitHub Plugin Template",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "First Party Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
children: [
|
||||
{
|
||||
text: "Plugin Shortname Index",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"/contribute/": [
|
||||
{
|
||||
text: "Contribute",
|
||||
children: [
|
||||
"/contribute/core.md",
|
||||
"/contribute/documentation.md",
|
||||
"/contribute/first-party-plugins.md",
|
||||
"/contribute/github-actions.md",
|
||||
],
|
||||
},
|
||||
],
|
||||
"/learn-more/": [
|
||||
{
|
||||
text: "Questions",
|
||||
children: [
|
||||
"/learn-more/faq.md",
|
||||
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "StackOverflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Resources",
|
||||
children: ["/learn-more/thanks.md"],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const pt_br = {
|
||||
"/pt-br/guide/": [
|
||||
"/pt-br/guide/introduction.md",
|
||||
"/pt-br/guide/getting-started.md",
|
||||
],
|
||||
"/pt-br/manage/": [
|
||||
{
|
||||
text: "Manage",
|
||||
children: [
|
||||
"/pt-br/manage/core.md",
|
||||
"/pt-br/manage/plugins.md",
|
||||
"/pt-br/manage/versions.md",
|
||||
"/pt-br/manage/configuration.md",
|
||||
"/pt-br/manage/commands.md",
|
||||
{
|
||||
text: "Alterações",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"/pt-br/plugins/": [
|
||||
{
|
||||
text: "Author",
|
||||
children: [
|
||||
"/pt-br/plugins/create.md",
|
||||
{
|
||||
text: "GitHub Plugin Template",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "First Party Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Community Plugins",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Reference",
|
||||
children: [
|
||||
{
|
||||
text: "Plugin Shortname Index",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"/pt-br/contribute/": [
|
||||
{
|
||||
text: "Contribute",
|
||||
children: [
|
||||
"/pt-br/contribute/core.md",
|
||||
"/pt-br/contribute/documentation.md",
|
||||
"/pt-br/contribute/first-party-plugins.md",
|
||||
"/pt-br/contribute/github-actions.md",
|
||||
],
|
||||
},
|
||||
],
|
||||
"/pt-br/learn-more/": [
|
||||
{
|
||||
text: "Questions",
|
||||
children: [
|
||||
"/pt-br/learn-more/faq.md",
|
||||
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "StackOverflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Resources",
|
||||
children: ["/pt-br/learn-more/thanks.md"],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const zh_hans = {
|
||||
"/zh-hans/guide/": [
|
||||
"/zh-hans/guide/introduction.md",
|
||||
"/zh-hans/guide/getting-started.md",
|
||||
],
|
||||
"/zh-hans/manage/": [
|
||||
{
|
||||
text: "管理",
|
||||
children: [
|
||||
"/zh-hans/manage/core.md",
|
||||
"/zh-hans/manage/plugins.md",
|
||||
"/zh-hans/manage/versions.md",
|
||||
"/zh-hans/manage/configuration.md",
|
||||
"/zh-hans/manage/commands.md",
|
||||
{
|
||||
text: "更新日志",
|
||||
link: "https://github.com/asdf-vm/asdf/blob/master/CHANGELOG.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"/zh-hans/plugins/": [
|
||||
{
|
||||
text: "成为作者",
|
||||
children: [
|
||||
"/zh-hans/plugins/create.md",
|
||||
{
|
||||
text: "GitHub Plugin 模板",
|
||||
link: "https://github.com/asdf-vm/asdf-plugin-template",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "官方插件",
|
||||
children: [
|
||||
{
|
||||
text: "Elixir",
|
||||
link: "https://github.com/asdf-vm/asdf-elixir",
|
||||
},
|
||||
{
|
||||
text: "Erlang",
|
||||
link: "https://github.com/asdf-vm/asdf-erlang",
|
||||
},
|
||||
{
|
||||
text: "Node.js",
|
||||
link: "https://github.com/asdf-vm/asdf-nodejs",
|
||||
},
|
||||
{
|
||||
text: "Ruby",
|
||||
link: "https://github.com/asdf-vm/asdf-ruby",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "社区插件",
|
||||
children: [
|
||||
{
|
||||
text: "asdf-community",
|
||||
link: "https://github.com/asdf-community/",
|
||||
},
|
||||
{
|
||||
text: "GitHub 主题搜索",
|
||||
link: "https://github.com/topics/asdf-plugin",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "参考",
|
||||
children: [
|
||||
{
|
||||
text: "插件缩写索引",
|
||||
link: "https://github.com/asdf-vm/asdf-plugins",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"/zh-hans/contribute/": [
|
||||
{
|
||||
text: "如何贡献",
|
||||
children: [
|
||||
"/zh-hans/contribute/core.md",
|
||||
"/zh-hans/contribute/documentation.md",
|
||||
"/zh-hans/contribute/first-party-plugins.md",
|
||||
"/zh-hans/contribute/github-actions.md",
|
||||
],
|
||||
},
|
||||
],
|
||||
"/zh-hans/learn-more/": [
|
||||
{
|
||||
text: "常见问题",
|
||||
children: [
|
||||
"/zh-hans/learn-more/faq.md",
|
||||
|
||||
{
|
||||
text: "GitHub Issues",
|
||||
link: "https://github.com/asdf-vm/asdf/issues",
|
||||
},
|
||||
{
|
||||
text: "StackOverflow Tag",
|
||||
link: "https://stackoverflow.com/questions/tagged/asdf-vm",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "资源",
|
||||
children: ["/zh-hans/learn-more/thanks.md"],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default { en, pt_br, zh_hans };
|
@ -1,17 +0,0 @@
|
||||
:root {
|
||||
scroll-behavior: smooth;
|
||||
--c-brand: #b744b8;
|
||||
--c-brand-light: #a379c9;
|
||||
// tip container
|
||||
--c-tip: #0070f3;
|
||||
--c-tip-bg: #e3eeff;
|
||||
--c-tip-title: #004bad;
|
||||
--c-tip-text: #002974;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
--c-brand: #b744b8;
|
||||
--c-brand-light: #a379c9;
|
||||
// tip container
|
||||
--c-tip: #31558a;
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
|
||||
Fork `asdf` on GitHub and/or Git clone the default branch:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# clone your fork
|
||||
git clone https://github.com/<GITHUB_USER>/asdf.git
|
||||
# or clone asdf
|
||||
@ -15,7 +15,7 @@ git clone https://github.com/asdf-vm/asdf.git
|
||||
|
||||
The tools for core development are in this repo's `.tool-versions`. If you wish to manage with `asdf` itself, add the plugins:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add bats https://github.com/timgluz/asdf-bats.git
|
||||
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
|
||||
asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git
|
||||
@ -23,7 +23,7 @@ asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git
|
||||
|
||||
Install the versions to develop `asdf` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install
|
||||
```
|
||||
|
||||
@ -39,7 +39,7 @@ If you want to try out your changes without making change to your installed `asd
|
||||
|
||||
It is best to format, lint and test your code locally before you commit or push to the remote. Use the following scripts/commands:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# Lint
|
||||
./scripts/lint.bash --check
|
||||
|
||||
@ -71,19 +71,19 @@ The following is the `.gitignore` file in the `asdf-vm/asdf` repository. We igno
|
||||
|
||||
Use the file with `git blame` like so:
|
||||
|
||||
```sh:no-line-numbers
|
||||
```sh
|
||||
git blame --ignore-revs-file .git-blame-ignore-revs ./test/install_command.bats
|
||||
```
|
||||
|
||||
Optionally, configure to use the file on every invocation of `blame` without manually supplying it:
|
||||
|
||||
```sh:no-line-numbers
|
||||
```sh
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
```
|
||||
|
||||
It is possible to configure IDEs to use this file. For example, when using VSCode (with [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)), write the following to `.vscode/settings.json`:
|
||||
|
||||
```json:no-line-numbers
|
||||
```json
|
||||
{
|
||||
"gitlens.advanced.blame.customArguments": [
|
||||
"--ignore-revs-file",
|
||||
@ -127,7 +127,7 @@ This is further documented in bats-core [Printing to the Terminal](https://bats-
|
||||
|
||||
Conventional Commit follows this format:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
<type>[optional scope][optional !]: <description>
|
||||
|
||||
<!-- examples -->
|
||||
|
@ -6,7 +6,7 @@ Documentation & site contribution guide.
|
||||
|
||||
Fork `asdf` on GitHub and/or Git clone the default branch:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# clone your fork
|
||||
git clone https://github.com/<GITHUB_USER>/asdf.git
|
||||
# or clone asdf
|
||||
@ -15,13 +15,13 @@ git clone https://github.com/asdf-vm/asdf.git
|
||||
|
||||
The tools for Docs site development are managed with `asdf` in the `docs/.tool-versions`. Add the plugins with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs
|
||||
```
|
||||
|
||||
Install the tool version(s) with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install
|
||||
```
|
||||
|
||||
@ -29,13 +29,13 @@ asdf install
|
||||
|
||||
Install Node.js dependencies from `docs/package.json`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
[Vuepress (v2)](https://v2.vuepress.vuejs.org/) is the Static Site Generator (SSG) we use to build the asdf documentation site. It was chosen to replace [Docsify.js](https://docsify.js.org/) as we would like to support an HTML only fallback when users do not have JavaScript available or enabled. This was not possible with Docsify. Other than this, the feature-set is largely the same, with the focus on writing Markdown files with minimal configuration.
|
||||
[VitePress (v2)](https://vitepress.dev/) is the Static Site Generator (SSG) we use to build the asdf documentation site. It was chosen to replace [Docsify.js](https://docsify.js.org/) and subsequently VuePress as we would like to support an HTML only fallback when users do not have JavaScript available or enabled. This was not possible with Docsify & VitePress quicly supplanted VuePress. Other than this, the feature-set is largely the same, with the focus on writing Markdown files with minimal configuration.
|
||||
|
||||
`package.json` contains the scripts required for development:
|
||||
|
||||
@ -43,13 +43,13 @@ npm install
|
||||
|
||||
To start the local development server:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Format the code before committing:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm run format
|
||||
```
|
||||
|
||||
@ -59,51 +59,64 @@ npm run format
|
||||
|
||||
When creating a PR for documentation changes please make the PR title with the Conventional Commit type `docs` in the format `docs: <description>`.
|
||||
|
||||
## Vuepress
|
||||
## Vitepress
|
||||
|
||||
Configuration of the site is contained within a few JavaScript files with JS Objects used to represent the config. They are:
|
||||
Configuration of the site is contained within a few TypeScript files with JS Objects used to represent the config. They are:
|
||||
|
||||
- `docs/.vuepress/config.js`: the root config file for the site. Read the [Vuepress documentation](https://v2.vuepress.vuejs.org/guide/configuration.html#config-file) for it's spec.
|
||||
- `docs/.vitepress/config.js`: the root config file for the site. Read the [VitePress documentation](https://vitepress.dev/reference/site-config) for it's spec.
|
||||
|
||||
To simplify the root config, the larger JS Objects representing the _navbar_ and _sidebar_ configuration have been extracted and separated by their locale. See both in:
|
||||
|
||||
- `docs/.vuepress/navbar.js`
|
||||
- `docs/.vuepress/sidebar.js`
|
||||
- `docs/.vitepress/navbars.js`
|
||||
- `docs/.vitepress/sidebars.js`
|
||||
|
||||
With the official documentation for these configs living in the [Default Theme Reference](https://v2.vuepress.vuejs.org/reference/default-theme/config.html#locale-config).
|
||||
With the official documentation for these configs living in the [Default Theme Reference](https://vitepress.dev/reference/default-theme-config).
|
||||
|
||||
## I18n
|
||||
|
||||
Vuepress has first-class support for internationalization. The
|
||||
root config `docs/.vuepress/config.js` defines the supported locales with their URL, title in the selection dropdown menu and navbar/sidebar configs references.
|
||||
VitePress has first-class support for internationalization. The
|
||||
root config `docs/.vitepress/config.js` defines the supported locales with their URL, title in the selection dropdown menu and navbar/sidebar configs references.
|
||||
|
||||
The navbar/sidebar configs are captured in the aforementioned config files, separated by locale and exported individually.
|
||||
|
||||
The markdown content for each locale must fall under a folder with the same name as the keys for `locales` in the root config. That is:
|
||||
|
||||
```js
|
||||
{
|
||||
// docs/.vitepress/config.js
|
||||
export default defineConfig({
|
||||
...
|
||||
themeConfig: {
|
||||
locales: {
|
||||
"/": {
|
||||
selectLanguageName: "English (US)",
|
||||
sidebar: sidebar.en,
|
||||
navbar: navbar.en
|
||||
locales: {
|
||||
root: {
|
||||
label: "English",
|
||||
lang: "en-US",
|
||||
themeConfig: {
|
||||
nav: navbars.en,
|
||||
sidebar: sidebars.en,
|
||||
},
|
||||
"/pt-BR/": {
|
||||
selectLanguageName: "Brazilian Portuguese",
|
||||
sidebar: sidebar.pt_br,
|
||||
navbar: navbar.pt_br
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"pt-br": {
|
||||
label: "Brazilian Portuguese",
|
||||
lang: "pr-br",
|
||||
themeConfig: {
|
||||
nav: navbars.pt_br,
|
||||
sidebar: sidebars.pt_br,
|
||||
},
|
||||
},
|
||||
"zh-hans": {
|
||||
label: "简体中文",
|
||||
lang: "zh-hans",
|
||||
themeConfig: {
|
||||
nav: navbars.zh_hans,
|
||||
sidebar: sidebars.zh_hans,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
`/pt-BR/` will require the same set of markdown files located under `docs/pt-BR/`, like so:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
docs
|
||||
├─ README.md
|
||||
├─ foo.md
|
||||
@ -116,4 +129,4 @@ docs
|
||||
└─ README.md
|
||||
```
|
||||
|
||||
The [official Vuepress i18n documentation](https://v2.vuepress.vuejs.org/guide/i18n.html#site-i18n-config) goes into more detail.
|
||||
The [official VitePress i18n documentation](https://vitepress.dev/guide/i18n) goes into more detail.
|
||||
|
@ -34,8 +34,10 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
|
||||
|
||||
<!-- x-release-please-start-version -->
|
||||
|
||||
```shell:no-line-numbers
|
||||
|
||||
```shell
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.12.0
|
||||
|
||||
```
|
||||
|
||||
<!-- x-release-please-end -->
|
||||
@ -93,13 +95,13 @@ Completions must be configured manually with the following entry in your `.bash_
|
||||
|
||||
Add `asdf.sh` to your `~/.bashrc` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bashrc
|
||||
```
|
||||
|
||||
Completions will need to be [configured as per Homebrew's instructions](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) or with the following:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bashrc
|
||||
```
|
||||
|
||||
@ -111,13 +113,13 @@ If using **macOS Catalina or newer**, the default shell has changed to **ZSH**.
|
||||
|
||||
Add `asdf.sh` to your `~/.bash_profile` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
Completions will need to be [configured as per Homebrew's instructions](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) or with the following:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
@ -144,7 +146,7 @@ source ~/.asdf/asdf.fish
|
||||
|
||||
Completions must be configured manually with the following command:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
|
||||
```
|
||||
|
||||
@ -154,7 +156,7 @@ mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.
|
||||
|
||||
Add `asdf.fish` to your `~/.config/fish/config.fish` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\nsource "(brew --prefix asdf)"/libexec/asdf.fish" >> ~/.config/fish/config.fish
|
||||
```
|
||||
|
||||
@ -176,7 +178,7 @@ Completions are automatically configured on installation by the AUR package.
|
||||
|
||||
Add `asdf.elv` to your `~/.config/elvish/rc.elv` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s ~/.asdf/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -190,7 +192,7 @@ Completions are automatically configured.
|
||||
|
||||
Add `asdf.elv` to your `~/.config/elvish/rc.elv` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s (brew --prefix asdf)/libexec/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -203,7 +205,7 @@ Completions are automatically configured.
|
||||
|
||||
Add `asdf.elv` to your `~/.config/elvish/rc.elv` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s /opt/asdf-vm/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -277,7 +279,7 @@ Add the following to `~/.config/powershell/profile.ps1`:
|
||||
|
||||
Add `asdf.sh` to your `~/.config/powershell/profile.ps1` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.ps1\"" >> ~/.config/powershell/profile.ps1
|
||||
```
|
||||
|
||||
@ -308,7 +310,7 @@ Completions are automatically configured
|
||||
|
||||
Add `asdf.nu` to your `~/.config/nushell/config.nu` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
"\nlet-env ASDF_NU_DIR = (brew --prefix asdf | str trim | into string | path join 'libexec')\n source " + (brew --prefix asdf | into string | path join 'libexec/asdf.nu') | save --append $nu.config-path
|
||||
```
|
||||
|
||||
@ -341,7 +343,7 @@ export ASDF_DIR="$HOME/.asdf"
|
||||
|
||||
Add `asdf.sh` to your `~/.profile` with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\nexport ASDF_DIR=\"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.profile
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.profile
|
||||
```
|
||||
@ -391,7 +393,7 @@ We should install dependencies first as some Plugins have post-install hooks.
|
||||
|
||||
### Install the Plugin
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
|
||||
```
|
||||
|
||||
@ -403,7 +405,7 @@ We can see which versions are available with `asdf list all nodejs` or a subset
|
||||
|
||||
We will just install the `latest` available version:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install nodejs latest
|
||||
```
|
||||
|
||||
@ -423,7 +425,7 @@ Without a version listed for a tool execution of the tool will **error**. `asdf
|
||||
|
||||
Global defaults are managed in `$HOME/.tool-versions`. Set a global version with:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf global nodejs latest
|
||||
```
|
||||
|
||||
@ -439,7 +441,7 @@ Some OSs already have tools installed that are managed by the system and not `as
|
||||
|
||||
Local versions are defined in the `$PWD/.tool-versions` file (your current working directory). Usually, this will be the Git repository for a project. When in your desired directory execute:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf local nodejs latest
|
||||
```
|
||||
|
||||
|
@ -1,26 +1,40 @@
|
||||
---
|
||||
home: true
|
||||
title: Home
|
||||
# heroImage: https://vuejs.org/images/logo.png
|
||||
actions:
|
||||
- text: Get Started
|
||||
link: /guide/getting-started.html
|
||||
type: primary
|
||||
- text: Introduction
|
||||
link: /guide/introduction.html
|
||||
type: secondary
|
||||
# https://vitepress.dev/reference/default-theme-home-page
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: asdf
|
||||
text: The Multiple Runtime Version Manager
|
||||
tagline: Manage all your runtime versions with one tool!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Get Started
|
||||
link: /guide/getting-started
|
||||
- theme: alt
|
||||
text: What is asdf?
|
||||
link: /guide/introduction
|
||||
- theme: alt
|
||||
text: View on GitHub
|
||||
link: https://github.com/asdf-vm/asdf
|
||||
|
||||
features:
|
||||
- title: One Tool
|
||||
details: "Manage each of your project runtimes with a single CLI tool and command interface."
|
||||
icon: 🎉
|
||||
- title: Plugins
|
||||
details: "Large ecosystem of existing runtimes & tools. Simple API to add support for new tools as you need!"
|
||||
icon: 🔌
|
||||
- title: Backwards Compatible
|
||||
details: "Support for existing config files .nvmrc, .node-versions, .ruby-version for smooth migration!"
|
||||
icon: ⏮
|
||||
- title: "One Config File"
|
||||
details: ".tool-versions to manage all your tools, runtimes and their versions in a single, sharable place."
|
||||
icon: 📄
|
||||
- title: "Shells"
|
||||
details: "Supports Bash, ZSH, Fish & Elvish with completions available."
|
||||
icon: 🐚
|
||||
- title: "GitHub Actions"
|
||||
details: "Provides a GitHub Action to install and utilize your .tool-versions in your CI/CD workflows."
|
||||
# footer: MIT Licensed
|
||||
icon: 🤖
|
||||
|
||||
---
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
The list of all commands available in `asdf`. This list is the `asdf help` command text.
|
||||
|
||||
@[code](../../help.txt)
|
||||
<<< @../../help.txt
|
||||
|
@ -14,14 +14,14 @@ Global defaults can be set in the file `$HOME/.tool-versions`
|
||||
|
||||
This is what a `.tool-versions` file looks like:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
ruby 2.5.3
|
||||
nodejs 10.15.0
|
||||
```
|
||||
|
||||
You can also include comments:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
ruby 2.5.3 # This is a comment
|
||||
# This is another comment
|
||||
nodejs 10.15.0
|
||||
@ -38,7 +38,7 @@ The versions can be in the following format:
|
||||
|
||||
Multiple versions can be set by separating them with a space. For example, to use Python `3.7.2`, fallback to Python `2.7.15` and finally to the `system` Python, the following line can be added to `.tool-versions`.
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
python 3.7.2 2.7.15 system
|
||||
```
|
||||
|
||||
@ -58,7 +58,14 @@ The `.asdfrc` file defines the user's machine specific configuration.
|
||||
|
||||
The below file shows the required format with the default values:
|
||||
|
||||
@[code :no-line-numbers](../../defaults)
|
||||
```txt
|
||||
legacy_version_file = no
|
||||
use_release_candidates = no
|
||||
always_keep_download = no
|
||||
plugin_repository_last_check_duration = 60
|
||||
disable_plugin_short_name_repository = no
|
||||
concurrency = auto
|
||||
```
|
||||
|
||||
### `legacy_version_file`
|
||||
|
||||
|
@ -8,7 +8,7 @@ Covered in the [Getting Started](/guide/getting-started.md) guide.
|
||||
|
||||
## Exec
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf exec <command> [args...]
|
||||
```
|
||||
|
||||
@ -18,7 +18,7 @@ Executes the command shim for the current version.
|
||||
|
||||
## Env
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf env <command> [util]
|
||||
```
|
||||
|
||||
@ -26,7 +26,7 @@ asdf env <command> [util]
|
||||
|
||||
## Info
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf info
|
||||
```
|
||||
|
||||
@ -34,7 +34,7 @@ A helper command to print the OS, Shell and `asdf` debug information. Share this
|
||||
|
||||
## Reshim
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf reshim <name> <version>
|
||||
```
|
||||
|
||||
@ -42,7 +42,7 @@ This recreates the shims for the current version of a package. By default, shims
|
||||
|
||||
## Shim-versions
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf shim-versions <command>
|
||||
```
|
||||
|
||||
@ -50,14 +50,14 @@ Lists the plugins and versions that provide shims for a command.
|
||||
|
||||
As an example, [Node.js](https://nodejs.org/) ships with two executables, `node` and `npm`. When many versions of the tools are installed with [`asdf-nodejs`](https://github.com/asdf-vm/asdf-nodejs/) `shim-versions` can return:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
➜ asdf shim-versions node
|
||||
nodejs 14.8.0
|
||||
nodejs 14.17.3
|
||||
nodejs 16.5.0
|
||||
```
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
➜ asdf shim-versions npm
|
||||
nodejs 14.8.0
|
||||
nodejs 14.17.3
|
||||
@ -89,13 +89,13 @@ To uninstall `asdf` follow these steps:
|
||||
|
||||
2. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -112,13 +112,13 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -137,13 +137,13 @@ Completions may have been [configured as per Homebrew's instructions](https://do
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -164,13 +164,13 @@ Completions may have been [configured as per Homebrew's instructions](https://do
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -186,19 +186,19 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
4. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -214,19 +214,19 @@ source ~/.asdf/asdf.fish
|
||||
|
||||
and remove completions with this command:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf ~/.config/fish/completions/asdf.fish
|
||||
```
|
||||
|
||||
2. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -242,13 +242,13 @@ source "(brew --prefix asdf)"/libexec/asdf.fish
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -264,19 +264,19 @@ source /opt/asdf-vm/asdf.fish
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)
|
||||
```
|
||||
|
||||
4. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -293,19 +293,19 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
and uninstall the `asdf` module with this command:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -322,19 +322,19 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
and uninstall the `asdf` module with this command:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -351,25 +351,25 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
and uninstall the `asdf` module with this command:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
|
||||
```
|
||||
|
||||
4. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -391,13 +391,13 @@ compinit
|
||||
|
||||
2. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -413,13 +413,13 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force && brew autoremove
|
||||
```
|
||||
|
||||
3. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -435,19 +435,19 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. Uninstall with your package manager:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. Remove the `$HOME/.asdf` dir:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
4. Run this command to remove all `asdf` config files:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
|
@ -8,14 +8,14 @@ See [Creating Plugins](/plugins/create.md) for the plugin API used to support mo
|
||||
|
||||
Add plugins via their Git URL:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add <name> <git-url>
|
||||
# asdf plugin add elm https://github.com/vic/asdf-elm
|
||||
```
|
||||
|
||||
or via the short-name association in the plugins repository:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add <name>
|
||||
# asdf plugin add erlang
|
||||
```
|
||||
@ -28,14 +28,14 @@ Prefer the longer `git-url` method as it is independent of the short-name repo.
|
||||
|
||||
## List Installed
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list
|
||||
# asdf plugin list
|
||||
# java
|
||||
# nodejs
|
||||
```
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list --urls
|
||||
# asdf plugin list
|
||||
# java https://github.com/halcyon/asdf-java.git
|
||||
@ -44,7 +44,7 @@ asdf plugin list --urls
|
||||
|
||||
## List All in Short-name Repository
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list all
|
||||
```
|
||||
|
||||
@ -52,13 +52,13 @@ See [Plugins Shortname Index](https://github.com/asdf-vm/asdf-plugins) for the e
|
||||
|
||||
## Update
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin update --all
|
||||
```
|
||||
|
||||
If you want to update a specific package, just say so.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin update <name>
|
||||
# asdf plugin update erlang
|
||||
```
|
||||
@ -67,7 +67,7 @@ This update will fetch the _latest commit_ on the _default branch_ of the _origi
|
||||
|
||||
## Remove
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
asdf plugin remove <name>
|
||||
# asdf plugin remove erlang
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## Install Version
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> <version>
|
||||
# asdf install erlang 17.3
|
||||
```
|
||||
@ -11,63 +11,63 @@ If a plugin supports downloading & compiling from source, you can specify `ref:f
|
||||
|
||||
## Install Latest Stable Version
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> latest
|
||||
# asdf install erlang latest
|
||||
```
|
||||
|
||||
Install latest stable version that begins with a given string.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> latest:<version>
|
||||
# asdf install erlang latest:17
|
||||
```
|
||||
|
||||
## List Installed Versions
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list <name>
|
||||
# asdf list erlang
|
||||
```
|
||||
|
||||
Filter versions to those that begin with a given string.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list <name> <version>
|
||||
# asdf list erlang 17
|
||||
```
|
||||
|
||||
## List All Available Versions
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list all <name>
|
||||
# asdf list all erlang
|
||||
```
|
||||
|
||||
Filter versions to those that begin with a given string.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list all <name> <version>
|
||||
# asdf list all erlang 17
|
||||
```
|
||||
|
||||
## Show Latest Stable Version
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf latest <name>
|
||||
# asdf latest erlang
|
||||
```
|
||||
|
||||
Show latest stable version that begins with a given string.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf latest <name> <version>
|
||||
# asdf latest erlang 17
|
||||
```
|
||||
|
||||
## Set Current Version
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf global <name> <version> [<version>...]
|
||||
asdf shell <name> <version> [<version>...]
|
||||
asdf local <name> <version> [<version>...]
|
||||
@ -95,7 +95,7 @@ can set an environment variable like `ASDF_${TOOL}_VERSION`.
|
||||
The following example runs tests on an Elixir project with version `1.4.0`.
|
||||
The version format is the same supported by the `.tool-versions` file.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
ASDF_ELIXIR_VERSION=1.4.0 mix test
|
||||
```
|
||||
|
||||
@ -105,14 +105,14 @@ To use the system version of tool `<name>` instead of an asdf managed version yo
|
||||
|
||||
Set system with either `global`, `local` or `shell` as outlined in [Set Current Version](#set-current-version) section above.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf local <name> system
|
||||
# asdf local python system
|
||||
```
|
||||
|
||||
## View Current Version
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf current
|
||||
# asdf current
|
||||
# erlang 17.3 /Users/kim/.tool-versions
|
||||
@ -125,7 +125,7 @@ asdf current <name>
|
||||
|
||||
## Uninstall Version
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf uninstall <name> <version>
|
||||
# asdf uninstall erlang 17.3
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Projects
|
||||
# Community Projects
|
||||
|
||||
Here are some community projects related to `asdf`:
|
||||
|
||||
|
5057
docs/package-lock.json
generated
5057
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,13 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "vuepress dev .",
|
||||
"build": "vuepress build .",
|
||||
"format": "npx -y prettier --write '{.vuepress/{config,navbar,sidebar}.js,./**/*.md}'"
|
||||
"fmt": "prettier --write '.vitepress/{config,navbars,sidebars}.ts' '.vitepress/theme/**/*'",
|
||||
"dev": "vitepress dev",
|
||||
"build": "vitepress build",
|
||||
"preview": "vitepress preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vuepress/plugin-active-header-links": "^2.0.0-beta.53",
|
||||
"@vuepress/plugin-search": "^2.0.0-beta.53",
|
||||
"@vuepress/plugin-shiki": "^2.0.0-beta.53",
|
||||
"vuepress": "^2.0.0-beta.53"
|
||||
"@types/node": "^20.3.1",
|
||||
"prettier": "^2.8.8",
|
||||
"vitepress": "^1.0.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ List all installable versions.
|
||||
|
||||
Must print a string with a **space-separated** list of versions. For example:
|
||||
|
||||
```text:no-line-numbers
|
||||
```txt
|
||||
1.0.1 1.0.2 1.3.0 1.4
|
||||
```
|
||||
|
||||
@ -129,7 +129,7 @@ No environment variables are provided to this script.
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/list-all"
|
||||
```
|
||||
|
||||
@ -177,7 +177,7 @@ All plugins must include this script as support for legacy plugins will eventual
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/download
|
||||
```
|
||||
|
||||
@ -228,7 +228,7 @@ variable. If set, assume the `bin/download` script already downloaded the versio
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/install
|
||||
```
|
||||
|
||||
@ -277,7 +277,7 @@ Determine the latest stable version of a tool. If absent, the asdf core will `ta
|
||||
|
||||
The script should accept a single argument, the filter query.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/latest-stable ""
|
||||
"${plugin_path}"/bin/latest-stable "$query"
|
||||
```
|
||||
@ -314,7 +314,7 @@ Output a general description about the plugin and the tool being managed.
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/help.overview
|
||||
```
|
||||
|
||||
@ -326,7 +326,7 @@ Output a general description about the plugin and the tool being managed.
|
||||
|
||||
Output the list of dependencies tailored to the operating system. One dependency per line.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
git
|
||||
curl
|
||||
sed
|
||||
@ -353,7 +353,7 @@ sed
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/help.deps
|
||||
```
|
||||
|
||||
@ -387,7 +387,7 @@ Output any required or optional configuration for the plugin and tool. For examp
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/help.config
|
||||
```
|
||||
|
||||
@ -399,7 +399,7 @@ Output any required or optional configuration for the plugin and tool. For examp
|
||||
|
||||
Output a list of links relevant to the plugin and tool. One link per line.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
Git Repository: https://github.com/vlang/v
|
||||
Documentation: https://vlang.io
|
||||
```
|
||||
@ -429,7 +429,7 @@ Documentation: https://vlang.io
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}"/bin/help.links
|
||||
```
|
||||
|
||||
@ -447,7 +447,7 @@ List directories containing executables for the specified version of the tool.
|
||||
- Output a space-separated list of paths containing executables.
|
||||
- Paths must be relative to `ASDF_INSTALL_PATH`. Example output would be:
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
bin tools veggies
|
||||
```
|
||||
|
||||
@ -471,7 +471,7 @@ This will instruct asdf to create shims for the files in:
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/list-bin-paths"
|
||||
```
|
||||
|
||||
@ -499,7 +499,7 @@ Prepare the environment before executing the shims for the binaries for the tool
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/exec-env"
|
||||
```
|
||||
|
||||
@ -548,7 +548,7 @@ Output:
|
||||
|
||||
**Call signature from asdf core**
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/exec-path" "$install_path" "$cmd" "$relative_path"
|
||||
```
|
||||
|
||||
@ -577,7 +577,7 @@ No environment variables are provided to this script.
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/uninstall"
|
||||
```
|
||||
|
||||
@ -592,7 +592,7 @@ List legacy configuration filenames for determining the specified version of the
|
||||
**Implementation Details**
|
||||
|
||||
- Output a space-separated list of filenames.
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
.ruby-version .rvmrc
|
||||
```
|
||||
- Only applies for users who have enabled the `legacy_version_file` option in their `"${HOME}"/.asdfrc`.
|
||||
@ -613,7 +613,7 @@ Any command which reads a tool version.
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/list-legacy-filenames"
|
||||
```
|
||||
|
||||
@ -632,7 +632,7 @@ Parse the legacy file found by asdf to determine the version of the tool. Useful
|
||||
- when parsing the same legacy file.
|
||||
- regardless of what is installed on the machine or whether the legacy version is valid or complete. Some legacy file formats may not be suitable.
|
||||
- Output a single line with the version:
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
1.2.3
|
||||
```
|
||||
|
||||
@ -648,7 +648,7 @@ Any command which reads a tool version.
|
||||
|
||||
The script should accept a single argument, the path to the legacy file for reading its contents.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/parse-legacy-file" "$file_path"
|
||||
```
|
||||
|
||||
@ -676,7 +676,7 @@ See also the related command hooks:
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/post-plugin-add"
|
||||
```
|
||||
|
||||
@ -705,7 +705,7 @@ See also the related command hooks:
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/post-plugin-update"
|
||||
```
|
||||
|
||||
@ -732,7 +732,7 @@ See also the related command hooks:
|
||||
|
||||
No parameters provided.
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
"${plugin_path}/bin/pre-plugin-remove"
|
||||
```
|
||||
|
||||
@ -747,7 +747,7 @@ the asdf command line interface by using the plugin name as a subcommand.
|
||||
|
||||
For example, suppose a `foo` plugin has:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
foo/
|
||||
lib/commands/
|
||||
command.bash
|
||||
@ -758,7 +758,7 @@ foo/
|
||||
|
||||
Users can now execute:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
$ asdf foo # same as running `$ASDF_DATA_DIR/plugins/foo/lib/commands/command.bash`
|
||||
$ asdf foo bar # same as running `$ASDF_DATA_DIR/plugins/foo/lib/commands/command.bash bar`
|
||||
$ asdf foo help # same as running `$ASDF_DATA_DIR/plugins/foo/lib/commands/command-help.bash`
|
||||
@ -806,7 +806,7 @@ executable. This makes it not possible to use the standard Bash shim.
|
||||
|
||||
`asdf` contains the `plugin-test` command to test your plugin:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin test <plugin_name> <plugin_url> [--asdf-tool-version <version>] [--asdf-plugin-gitref <git_ref>] [test_command...]
|
||||
```
|
||||
|
||||
@ -819,7 +819,7 @@ asdf plugin test <plugin_name> <plugin_url> [--asdf-tool-version <version>] [--a
|
||||
- Optional parameter `[test_command...]` is the command to execute to validate
|
||||
the installed tool works correctly. Typically `<tool> --version` or
|
||||
`<tool> --help`. For example, to test the NodeJS plugin, we could run
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# asdf plugin test <plugin_name> <plugin_url> [test_command]
|
||||
asdf plugin test nodejs https://github.com/asdf-vm/asdf-nodejs.git node --version
|
||||
```
|
||||
@ -880,7 +880,7 @@ os:
|
||||
When using another CI you may need to pass a relative path to the plugin
|
||||
location:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin test <tool_name> <path> '<tool_command> --version'
|
||||
```
|
||||
|
||||
@ -922,7 +922,7 @@ NEVER publish your authentication tokens in your code repository
|
||||
|
||||
The recommended installation method for a plugin is via direct URL installation:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# asdf plugin add <name> <git_url>
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs
|
||||
```
|
||||
|
@ -8,7 +8,7 @@ guia de contribuição principal `asdf`.
|
||||
|
||||
Fork `asdf` no GitHub e/ou Git clone o branch padrão:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# clone your fork
|
||||
git clone https://github.com/<GITHUB_USER>/asdf.git
|
||||
# or clone asdf
|
||||
@ -17,7 +17,7 @@ git clone https://github.com/asdf-vm/asdf.git
|
||||
|
||||
As ferramentas para o desenvolvimento do núcleo estão em `.tool-versions` deste repositório. Se você deseja gerenciar com o próprio `asdf`, adicione os plugins:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add bats https://github.com/timgluz/asdf-bats.git
|
||||
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
|
||||
asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git
|
||||
@ -25,7 +25,7 @@ asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git
|
||||
|
||||
Instale as versões para desenvolver `asdf` com:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install
|
||||
```
|
||||
|
||||
@ -41,7 +41,7 @@ Se você quiser testar suas alterações sem fazer alterações em seu `asdf` in
|
||||
|
||||
É melhor formatar, lint e testar seu código localmente antes de confirmar ou enviar para o controle remoto. Use os seguintes scripts/comandos:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# Shellcheck
|
||||
./scripts/shellcheck.bash
|
||||
|
||||
@ -83,7 +83,7 @@ O `asdf` está usando uma ferramenta de lançamento automatizada chamada [Releas
|
||||
|
||||
O Commit Convencional segue este formato:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
<type>[optional scope][optional !]: <description>
|
||||
|
||||
<!-- examples -->
|
||||
|
@ -8,7 +8,7 @@ Documentação e guia de contribuição do site.
|
||||
|
||||
Fork `asdf` no GitHub e/ou Git clone o branch padrão:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# clone your fork
|
||||
git clone https://github.com/<GITHUB_USER>/asdf.git
|
||||
# or clone asdf
|
||||
@ -17,13 +17,13 @@ git clone https://github.com/asdf-vm/asdf.git
|
||||
|
||||
As ferramentas para desenvolvimento de sites Docs são gerenciadas com `asdf` em `docs/.tool-versions`. Adicione os plugins com:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs
|
||||
```
|
||||
|
||||
Instale a(s) versão(ões) da ferramenta com:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install
|
||||
```
|
||||
|
||||
@ -31,7 +31,7 @@ asdf install
|
||||
-
|
||||
Instale as dependências do Node.js do `docs/package.json`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
@ -45,13 +45,13 @@ npm install
|
||||
|
||||
Para iniciar o servidor de desenvolvimento local:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Formate o código antes de confirmar:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm run format
|
||||
```
|
||||
|
||||
@ -104,7 +104,7 @@ O conteúdo de markdown para cada localidade deve estar em uma pasta com o mesmo
|
||||
|
||||
`/pt-BR/` exigirá o mesmo conjunto de arquivos markdown localizados em `docs/pt-BR/`, assim:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
docs
|
||||
├─ README.md
|
||||
├─ foo.md
|
||||
|
@ -38,7 +38,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
|
||||
|
||||
<!-- x-release-please-start-version -->
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.12.0
|
||||
```
|
||||
|
||||
@ -95,13 +95,13 @@ O auto completar deve ser configurado manualmente a partir da adição da seguin
|
||||
|
||||
Adicione `asdf.sh` ao `~/.bashrc` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.bashrc
|
||||
```
|
||||
|
||||
O auto completar deve ser configurado seguindo as [instruções da Homebrew](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash), ou as seguintes:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bashrc
|
||||
```
|
||||
|
||||
@ -113,13 +113,13 @@ Se você estiver usando o **macOS Catalina ou mais recente**, o shell padrão mu
|
||||
|
||||
Adicione `asdf.sh` ao `~/.bash_profile` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
O auto completar deve ser configurado seguindo as [instruções da Homebrew](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash), ou as seguintes:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
@ -146,7 +146,7 @@ source ~/.asdf/asdf.fish
|
||||
|
||||
O auto completar deve ser configurado manualmente através do seguinte comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
|
||||
```
|
||||
|
||||
@ -156,7 +156,7 @@ mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.
|
||||
|
||||
Adicione `asdf.fish` ao seu `~/.config/fish/config.fish` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\nsource "(brew --prefix asdf)"/asdf.fish" >> ~/.config/fish/config.fish
|
||||
```
|
||||
|
||||
@ -178,7 +178,7 @@ O auto completar é configurado automaticamente durante a instalação do pacote
|
||||
|
||||
Adicione `asdf.elv` ao `~/.config/elvish/rc.elv` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s ~/.asdf/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -192,7 +192,7 @@ Ao concluir atualizará automaticamente
|
||||
|
||||
Adicione `asdf.elv` ao `~/.config/elvish/rc.elv` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s (brew --prefix asdf)/libexec/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -205,7 +205,7 @@ Ao concluir atualizará automaticamente
|
||||
|
||||
Adicione `asdf.elv` ao `~/.config/elvish/rc.elv` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s /opt/asdf-vm/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -276,7 +276,7 @@ Adicione a seguinte linha ao seu `~/.config/powershell/profile.ps1`:
|
||||
|
||||
Adicione `asdf.ps1` ao seu `~/.config/powershell/profile.ps1` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.ps1\"" >> ~/.config/powershell/profile.ps1
|
||||
```
|
||||
|
||||
@ -307,7 +307,7 @@ Ao concluir atualizará automaticamente
|
||||
|
||||
Adicione `asdf.nu` ao seu `~/.config/nushell/config.nu` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
"\nlet-env ASDF_NU_DIR = (brew --prefix asdf | str trim | into string | path join 'libexec')\n source " + (brew --prefix asdf | into string | path join 'libexec/asdf.nu') | save --append $nu.config-path
|
||||
```
|
||||
|
||||
@ -340,7 +340,7 @@ export ASDF_DIR="$HOME/.asdf"
|
||||
|
||||
Adicione `asdf.sh` ao `~/.profile` através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\nexport ASDF_DIR=\"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.profile
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.profile
|
||||
```
|
||||
@ -382,7 +382,7 @@ Devemos instalar instalar as dependências primeiro, pois alguns plugins exigem
|
||||
|
||||
### Instalando o plugin
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
|
||||
```
|
||||
|
||||
@ -394,7 +394,7 @@ Podemos ver quais versões tão disponíveis através do comando `asdf list all
|
||||
|
||||
Vamos instalar somente a última versão disponível, utilizando a tag `latest`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install nodejs latest
|
||||
```
|
||||
|
||||
@ -414,7 +414,7 @@ Se uma versão não for especificada para uma ferramenta, ao executá-la resulta
|
||||
|
||||
Os padrões globais são gerenciados em `$HOME/.tool-versions`. Defina uma versão global através do comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf global nodejs latest
|
||||
```
|
||||
|
||||
@ -430,7 +430,7 @@ Alguns sistemas operacionais vêm por padrão com ferramentas que são gerenciad
|
||||
|
||||
Versões locais são definidas no arquivo `$PWD/.tool-versions` (seu diretório atual). Geralmente, será um repositório Git para um projeto. Quando estiver no diretório desejado, execute:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf local nodejs latest
|
||||
```
|
||||
|
||||
|
@ -1,26 +1,38 @@
|
||||
---
|
||||
home: true
|
||||
title: Home
|
||||
# heroImage: https://vuejs.org/images/logo.png
|
||||
actions:
|
||||
- text: "Começar"
|
||||
link: /pt-br/guide/getting-started.html
|
||||
type: primary
|
||||
- text: "Introdução"
|
||||
link: /pt-br/guide/introduction.html
|
||||
type: secondary
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: asdf
|
||||
text: O Gerenciador de Múltiplas Versões de Tempo de Execução
|
||||
tagline: Gerencie todas as suas versões de tempo de execução com uma ferramenta!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Começar
|
||||
link: /pt-br/guide/getting-started
|
||||
- theme: alt
|
||||
text: O que é asdf?
|
||||
link: /pt-br/guide/introduction
|
||||
- theme: alt
|
||||
text: Ver no GitHub
|
||||
link: https://github.com/asdf-vm/asdf
|
||||
|
||||
features:
|
||||
- title: Uma super ferramenta
|
||||
details: "Gerencie cada um dos runtimes e ferramentas dos seus projetos com uma única ferramenta de CLI"
|
||||
icon: 🎉
|
||||
- title: Plugins
|
||||
details: "Grande ecossistema de runtimes e ferramentas existentes. API simples para adicionar suporte para novas ferramentas conforme necessário!"
|
||||
icon: 🔌
|
||||
- title: "Compatível com varios arquivos de configuração"
|
||||
details: "Suporte para arquivos de configuração existentes .nvmrc, .node-versions, .ruby-version para uma migração tranquila!"
|
||||
icon: ⏮
|
||||
- title: "Só um arquivo de configuração"
|
||||
details: ".tool-versions para gerenciar todas as suas ferramentas, runtimes e suas versões em um único arquivo"
|
||||
icon: 📄
|
||||
- title: "Shells"
|
||||
details: "Suporta Bash, ZSH, Fish & Elvish com autocomplete."
|
||||
icon: 🐚
|
||||
- title: "GitHub Actions"
|
||||
details: "Fornece um GitHub Action para instalar e utilizar seu .tool-verions em seu fluxo de trabalho CICD."
|
||||
# footer: MIT Licensed
|
||||
icon: 🤖
|
||||
---
|
||||
|
@ -4,4 +4,4 @@
|
||||
|
||||
A lista de todos os comandos disponíveis em `asdf`. Esta lista é o texto do comando `asdf help`.
|
||||
|
||||
@[code](../../../help.txt)
|
||||
<<< @../../help.txt
|
||||
|
@ -12,7 +12,7 @@ Configurações globais podem ser modificadas no arquivo `$HOME/.tool-versions`
|
||||
|
||||
O arquivo `.tool-versions` se parece assim:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
ruby 2.5.3
|
||||
nodejs 10.15.0
|
||||
```
|
||||
@ -27,7 +27,7 @@ As versões podem estar no seguinte formato:
|
||||
|
||||
Várias versões podem ser definidas, separando-as com um espaço. Por exemplo, para usar Python 3.7.2, e também Python 2.7.15, use a linha abaixo em seu arquivo `.tool-versions`.
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
python 3.7.2 2.7.15 system
|
||||
```
|
||||
|
||||
@ -41,7 +41,7 @@ Edite o arquivo diretamente no diretório ou use `asdf local` (ou `asdf global`)
|
||||
|
||||
Adicione um arquivo `.asdfrc` ao seu diretório home e asdf usará as configurações especificadas no arquivo. O arquivo deve ser formatado assim:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
legacy_version_file = yes
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ Baseado no [Guia de Introdução](/pt-br/guide/getting-started.md).
|
||||
|
||||
## Execute
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf exec <command> [args...]
|
||||
```
|
||||
|
||||
@ -20,7 +20,7 @@ Executa o comando shim para a versão atual
|
||||
|
||||
## Variável de Ambiente
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf env <command> [util]
|
||||
```
|
||||
|
||||
@ -28,7 +28,7 @@ asdf env <command> [util]
|
||||
|
||||
## Informações
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf info
|
||||
```
|
||||
|
||||
@ -36,7 +36,7 @@ asdf info
|
||||
|
||||
## Reshim
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf reshim <name> <version>
|
||||
```
|
||||
|
||||
@ -44,7 +44,7 @@ Isso recria os shims para a versão atual de um pacote. Por padrão, os calços
|
||||
|
||||
## Versionamento do Shim
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf shim-versions <command>
|
||||
```
|
||||
|
||||
@ -52,14 +52,14 @@ Lista os plugins e versões que fornecem shims para um comando.
|
||||
|
||||
Como exemplo, o [Node.js](https://nodejs.org/) vem com dois executáveis, `node` e `npm`. Quando muitas versões das ferramentas são instaladas com [`asdf-nodejs`](https://github.com/asdf-vm/asdf-nodejs/) `shim-versions` pode retornar:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
➜ asdf shim-versions node
|
||||
nodejs 14.8.0
|
||||
nodejs 14.17.3
|
||||
nodejs 16.5.0
|
||||
```
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
➜ asdf shim-versions npm
|
||||
nodejs 14.8.0
|
||||
nodejs 14.17.3
|
||||
@ -295,19 +295,19 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
e desinstale o módulo `asdf` com este comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. Remova o diretório `$HOME/.asdf`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
|
||||
```
|
||||
|
||||
3. Execute este comando para remover todos os arquivos de configuração `asdf`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -324,19 +324,19 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
e desinstale o módulo `asdf` com este comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. Desinstale com seu gerenciador de pacotes:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. Execute este comando para remover todos os arquivos de configuração `asdf`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -353,25 +353,25 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
e desinstale o módulo `asdf` com este comando:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. Desinstale com seu gerenciador de pacotes:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. Remova o diretório `$ HOME/.asdf`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
|
||||
```
|
||||
|
||||
4. Execute este comando para remover todos os arquivos de configuração `asdf`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
|
@ -10,14 +10,14 @@ Veja [Criando Plugins](/pt-br/plugins/create.md) para a API do plugin usada para
|
||||
|
||||
Adicione os plugins via sua Url Git:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add <name> <git-url>
|
||||
# asdf plugin add elm https://github.com/vic/asdf-elm
|
||||
```
|
||||
|
||||
ou pelo nome abreviado dentro do repositório de plugins:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add <name>
|
||||
# asdf plugin add erlang
|
||||
```
|
||||
@ -28,14 +28,14 @@ Prefira o método mais longo `git-url`, pois ele é independente do repositório
|
||||
|
||||
## Listar Instalados
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list
|
||||
# asdf plugin list
|
||||
# java
|
||||
# nodejs
|
||||
```
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list --urls
|
||||
# asdf plugin list
|
||||
# java https://github.com/halcyon/asdf-java.git
|
||||
@ -44,7 +44,7 @@ asdf plugin list --urls
|
||||
|
||||
## Listar todos nomes abreviados no repositório
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list all
|
||||
```
|
||||
|
||||
@ -52,13 +52,13 @@ Veja [Plugins Shortname Index](https://github.com/asdf-vm/asdf-plugin-template)
|
||||
|
||||
## Atualizar
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin update --all
|
||||
```
|
||||
|
||||
Se você quiser atualizar um pacote específico, apenas use.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin update <name>
|
||||
# asdf plugin update erlang
|
||||
```
|
||||
@ -67,7 +67,7 @@ Esta atualização irá buscar o último _commit_ na _branch_ padrão no _origin
|
||||
|
||||
## Remover
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
asdf plugin remove <name>
|
||||
# asdf plugin remove erlang
|
||||
```
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Instalar Versão
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> <version>
|
||||
# asdf install erlang 17.3
|
||||
```
|
||||
@ -13,63 +13,63 @@ Se um plugin suporta o download e compilação do código-fonte, você pode espe
|
||||
|
||||
## Instalar última versão estável
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> latest
|
||||
# asdf install erlang latest
|
||||
```
|
||||
|
||||
Instale a última versão estável que inicia com um texto.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> latest:<version>
|
||||
# asdf install erlang latest:17
|
||||
```
|
||||
|
||||
## Listar versões instaladas
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list <name>
|
||||
# asdf list erlang
|
||||
```
|
||||
|
||||
Limite as versões que inicie com um determinado texto.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list <name> <version>
|
||||
# asdf list erlang 17
|
||||
```
|
||||
|
||||
## Listar todas as versões disponíveis
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list all <name>
|
||||
# asdf list all erlang
|
||||
```
|
||||
|
||||
Limite as versões que inicie com um determinado texto.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list all <name> <version>
|
||||
# asdf list all erlang 17
|
||||
```
|
||||
|
||||
## Mostrar última versão estável
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf latest <name>
|
||||
# asdf latest erlang
|
||||
```
|
||||
|
||||
Mostrar última versão estável que inicie com um determinado texto.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf latest <name> <version>
|
||||
# asdf latest erlang 17
|
||||
```
|
||||
|
||||
## Selecionar versão atual
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf global <name> <version> [<version>...]
|
||||
asdf shell <name> <version> [<version>...]
|
||||
asdf local <name> <version> [<version>...]
|
||||
@ -86,7 +86,7 @@ asdf local <name> latest[:<version>]
|
||||
|
||||
`local` escreve a versão para `$PWD/.tool-versions`, crie se necessário .
|
||||
|
||||
Veja em `.tool-versions` [arquivo de seleção de configuração](/pt-br/core-configuration) para mais detalhes.
|
||||
Veja em `.tool-versions` [arquivo de seleção de configuração](/pt-br/manage/configuration) para mais detalhes.
|
||||
|
||||
::: warning Alternativa
|
||||
Se você quiser selecionar a versão atual do seu _shell_ ou para executar um comando em uma versão específica de sua ferramenta, você pode selecionar a versão na variável de ambiente `ASDF_${TOOL}_VERSION`.
|
||||
@ -95,7 +95,7 @@ Se você quiser selecionar a versão atual do seu _shell_ ou para executar um co
|
||||
O seguinte exemplo executa os testes em um projeto Elixir na versão `1.4.0`.
|
||||
O formato da versão é o mesmo suportado pelo arquivo `.tool-versions`.
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
ASDF_ELIXIR_VERSION=1.4.0 mix test
|
||||
```
|
||||
|
||||
@ -106,14 +106,14 @@ Para usar o sistema de versão da ferramenta `<name>` inicie um gerenciador de v
|
||||
Selecione o sistema com `global`, `local` ou `shell`
|
||||
Set system with either `global`, `local` or `shell` conforme descrito em [Selecionar versão atual](#selecionar-versão-atual).
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf local <name> system
|
||||
# asdf local python system
|
||||
```
|
||||
|
||||
## Verificar a versão atual
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf current
|
||||
# asdf current
|
||||
# erlang 17.3 (set by /Users/kim/.tool-versions)
|
||||
@ -126,7 +126,7 @@ asdf current <name>
|
||||
|
||||
## Desinstalar versão
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf uninstall <name> <version>
|
||||
# asdf uninstall erlang 17.3
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Projects
|
||||
# Community Projects
|
||||
|
||||
Here are some community projects related to `asdf`:
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
在 Github 上 fork `asdf` 并且/或者使用 Git 克隆默认分支:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# 克隆你 fork 的 asdf
|
||||
git clone https://github.com/<GITHUB_USER>/asdf.git
|
||||
# 或者直接克隆 asdf
|
||||
@ -15,7 +15,7 @@ git clone https://github.com/asdf-vm/asdf.git
|
||||
|
||||
核心开发所需的工具都列举在这个存储库的 `.tool-versions` 文件中。如果你想要使用 `asdf` 自身来管理它,请使用以下命令添加这些插件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add bats https://github.com/timgluz/asdf-bats.git
|
||||
asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
|
||||
asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git
|
||||
@ -23,7 +23,7 @@ asdf plugin add shfmt https://github.com/luizm/asdf-shfmt.git
|
||||
|
||||
使用以下命令安装这些版本来开发 `asdf`:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install
|
||||
```
|
||||
|
||||
@ -39,7 +39,7 @@ asdf install
|
||||
|
||||
最好在提交或推送到远程之前,在本地做好格式化、lint 检查和测试你的代码。可以使用以下脚本/命令:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# 脚本检查
|
||||
./scripts/shellcheck.bash
|
||||
|
||||
@ -81,7 +81,7 @@ printf "%s\n" "Will be printed during bats -t test/some_tests.bats" >&3
|
||||
|
||||
约定式提交遵循以下格式:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
<type>[optional scope][optional !]: <description>
|
||||
|
||||
<!-- 例子 -->
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
在 Github 上 fork `asdf` 并且/或者使用 Git 克隆默认分支:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
# 克隆你 fork 的 asdf
|
||||
git clone https://github.com/<GITHUB_USER>/asdf.git
|
||||
# 或者直接克隆 asdf
|
||||
@ -15,13 +15,13 @@ git clone https://github.com/asdf-vm/asdf.git
|
||||
|
||||
文档网站开发所需的工具都在文件 `docs/.tool-versions` 中使用 `asdf` 进行管理。使用以下命令添加插件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs
|
||||
```
|
||||
|
||||
使用以下命令安装工具版本:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install
|
||||
```
|
||||
|
||||
@ -29,7 +29,7 @@ asdf install
|
||||
|
||||
根据 `docs/package.json` 文件安装 Node.js 依赖:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm install
|
||||
```
|
||||
|
||||
@ -43,13 +43,13 @@ npm install
|
||||
|
||||
启动本地开发服务器:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
在提交之前格式化代码:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
npm run format
|
||||
```
|
||||
|
||||
@ -102,7 +102,7 @@ Vuepress 有一流的国际化支持。根配置文件 `docs/.vuepress/config.js
|
||||
|
||||
`/pt-BR/` 将要求 markdown 文件的同一集合位于 `docs/pt-BR/` 目录下,如下所示:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
docs
|
||||
├─ README.md
|
||||
├─ foo.md
|
||||
|
@ -34,7 +34,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
|
||||
|
||||
<!-- x-release-please-start-version -->
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.12.0
|
||||
```
|
||||
|
||||
@ -91,13 +91,13 @@ We highly recommend using the official `git` method.
|
||||
|
||||
使用以下命令将 `asdf.sh` 加入到 `~/.bashrc` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bashrc
|
||||
```
|
||||
|
||||
补全功能将需要 [按照 Homebrew 的说明完成配置](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) 或者执行以下命令:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bashrc
|
||||
```
|
||||
|
||||
@ -109,13 +109,13 @@ echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.ba
|
||||
|
||||
使用以下命令将 `asdf.sh` 加入到 `~/.bash_profile` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
补全功能将需要 [按照 Homebrew 的说明完成配置](https://docs.brew.sh/Shell-Completion#configuring-completions-in-bash) 或者执行以下命令:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile
|
||||
```
|
||||
|
||||
@ -142,7 +142,7 @@ source ~/.asdf/asdf.fish
|
||||
|
||||
补全功能必须按照以下命令手动配置完成:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
|
||||
```
|
||||
|
||||
@ -152,7 +152,7 @@ mkdir -p ~/.config/fish/completions; and ln -s ~/.asdf/completions/asdf.fish ~/.
|
||||
|
||||
使用以下命令将 `asdf.fish` 加入到 `~/.config/fish/config.fish` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\nsource "(brew --prefix asdf)"/libexec/asdf.fish" >> ~/.config/fish/config.fish
|
||||
```
|
||||
|
||||
@ -174,7 +174,7 @@ source /opt/asdf-vm/asdf.fish
|
||||
|
||||
使用以下命令将 `asdf.elv` 加入到 `~/.config/elvish/rc.elv` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s ~/.asdf/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -188,7 +188,7 @@ echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/
|
||||
|
||||
使用以下命令将 `asdf.elv` 加入到 `~/.config/elvish/rc.elv` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s (brew --prefix asdf)/libexec/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -202,7 +202,7 @@ echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/
|
||||
|
||||
使用以下命令将 `asdf.elv` 加入到 `~/.config/elvish/rc.elv` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
mkdir -p ~/.config/elvish/lib; ln -s /opt/asdf-vm/asdf.elv ~/.config/elvish/lib/asdf.elv
|
||||
echo "\n"'use asdf _asdf; var asdf~ = $_asdf:asdf~' >> ~/.config/elvish/rc.elv
|
||||
echo "\n"'set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~' >> ~/.config/elvish/rc.elv
|
||||
@ -277,7 +277,7 @@ echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc
|
||||
|
||||
使用以下命令将 `asdf.ps1` 加入到 `~/.config/powershell/profile.ps1` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.ps1\"" >> ~/.config/powershell/profile.ps1
|
||||
```
|
||||
|
||||
@ -308,7 +308,7 @@ echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.ps1\"" >> ~/.config/powershell
|
||||
|
||||
使用以下命令将 `asdf.nu` 加入到 `~/.config/nushell/config.nu` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
"\nlet-env ASDF_NU_DIR = (brew --prefix asdf | str trim | into string | path join 'libexec')\n source " + (brew --prefix asdf | into string | path join 'libexec/asdf.nu') | save --append $nu.config-path
|
||||
```
|
||||
|
||||
@ -341,7 +341,7 @@ export ASDF_DIR="$HOME/.asdf"
|
||||
|
||||
使用以下命令将 `asdf.sh` 加入到 `~/.profile` 文件中:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
echo -e "\nexport ASDF_DIR=\"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.profile
|
||||
echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.profile
|
||||
```
|
||||
@ -386,7 +386,7 @@ export ASDF_DIR="/opt/asdf-vm"
|
||||
|
||||
### 安装插件
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
|
||||
```
|
||||
|
||||
@ -398,7 +398,7 @@ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
|
||||
|
||||
我们将只安装最新可用的 `latest` 版本:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install nodejs latest
|
||||
```
|
||||
|
||||
@ -418,7 +418,7 @@ asdf install nodejs latest
|
||||
|
||||
全局默认配置在 `$HOME/.tool-versions` 文件中进行管理。使用以下命令可以设置一个全局版本:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf global nodejs latest
|
||||
```
|
||||
|
||||
@ -434,7 +434,7 @@ nodejs 16.5.0
|
||||
|
||||
本地版本被定义在 `$PWD/.tool-versions` 文件中(当前工作目录)。通常,这将会是一个项目的 Git 存储库。当在你想要的目录执行:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf local nodejs latest
|
||||
```
|
||||
|
||||
|
@ -1,26 +1,39 @@
|
||||
---
|
||||
home: true
|
||||
title: 首页
|
||||
# heroImage: https://vuejs.org/images/logo.png
|
||||
actions:
|
||||
- text: 快速上手
|
||||
link: /zh-hans/guide/getting-started.html
|
||||
type: primary
|
||||
- text: 项目简介
|
||||
link: /zh-hans/guide/introduction.html
|
||||
type: secondary
|
||||
# https://vitepress.dev/reference/default-theme-home-page
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: asdf
|
||||
text: 多运行时版本管理器
|
||||
tagline: 使用一个工具管理所有运行时版本!
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 快速上手
|
||||
link: /zh-hans/guide/getting-started
|
||||
- theme: alt
|
||||
text: 什么是asdf?
|
||||
link: /zh-hans/guide/introduction
|
||||
- theme: alt
|
||||
text: 在 Github 上查看
|
||||
link: https://github.com/asdf-vm/asdf
|
||||
|
||||
features:
|
||||
- title: 一个工具
|
||||
details: "使用单个命令行工具和命令界面管理你的每个项目运行环境。"
|
||||
icon: 🎉
|
||||
- title: 插件
|
||||
details: "现有运行环境和工具的大型生态系统。简单 API 用于根据需要添加对新工具的支持!"
|
||||
icon: 🔌
|
||||
- title: 向后兼容
|
||||
details: "支持从现有配置文件 .nvmrc、.node-versions、.ruby-version 平滑迁移!"
|
||||
icon: ⏮
|
||||
- title: "一个配置文件"
|
||||
details: "一个可共享的 .tool-versions 配置文件管理所有工具、运行环境及其版本。"
|
||||
icon: 📄
|
||||
- title: "Shells"
|
||||
details: "支持 Bash、ZSH、Fish 和 Elvish,并提供补全功能。"
|
||||
icon: 🐚
|
||||
- title: "GitHub Actions"
|
||||
details: "提供 Github Action 在 CI/CD 工作流中安装和使用 .tool-versions。"
|
||||
# footer: MIT Licensed∏
|
||||
icon: 🤖
|
||||
---
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
`asdf` 中所有可用命令的列表。这个列表就是 `asdf help` 命令的打印内容。
|
||||
|
||||
@[code](../../../help.txt)
|
||||
<<< @../../help.txt
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
一个 `.tool-versions` 文件示例如下所示:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
ruby 2.5.3
|
||||
nodejs 10.15.0
|
||||
```
|
||||
|
||||
你也可以包含注释在里面:
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
ruby 2.5.3 # 这是一个注释
|
||||
# 这是另一个注释
|
||||
nodejs 10.15.0
|
||||
@ -36,7 +36,7 @@ nodejs 10.15.0
|
||||
|
||||
多版本可以通过空格将它们分隔开来。比如,使用 Python `3.7.2` 回退到 Python `2.7.15` 最后回退到 `system` Python,可以将以下行的内容添加到 `.tool-versions` 文件中。
|
||||
|
||||
```:no-line-numbers
|
||||
```
|
||||
python 3.7.2 2.7.15 system
|
||||
```
|
||||
|
||||
@ -52,11 +52,13 @@ python 3.7.2 2.7.15 system
|
||||
|
||||
给你的家目录添加一个 `.asdfrc` 文件然后 asdf 将会使用这个文件所指定的配置。下面的文件展示了所需的格式,其中包含用于演示的默认值:
|
||||
|
||||
```:no-line-numbers
|
||||
```txt
|
||||
legacy_version_file = no
|
||||
use_release_candidates = no
|
||||
always_keep_download = no
|
||||
plugin_repository_last_check_duration = 60
|
||||
disable_plugin_short_name_repository = no
|
||||
concurrency = auto
|
||||
```
|
||||
|
||||
### `legacy_version_file`
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
## Exec
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf exec <command> [args...]
|
||||
```
|
||||
|
||||
@ -18,7 +18,7 @@ asdf exec <command> [args...]
|
||||
|
||||
## Env
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf env <command> [util]
|
||||
```
|
||||
|
||||
@ -26,7 +26,7 @@ asdf env <command> [util]
|
||||
|
||||
## Info
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf info
|
||||
```
|
||||
|
||||
@ -34,7 +34,7 @@ asdf info
|
||||
|
||||
## Reshim
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf reshim <name> <version>
|
||||
```
|
||||
|
||||
@ -42,7 +42,7 @@ asdf reshim <name> <version>
|
||||
|
||||
## Shim-versions
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf shim-versions <command>
|
||||
```
|
||||
|
||||
@ -50,14 +50,14 @@ asdf shim-versions <command>
|
||||
|
||||
例如,[Node.js](https://nodejs.org/) 附带了两个可执行程序,`node` 和 `npm`。当使用 [`asdf-nodejs`](https://github.com/asdf-vm/asdf-nodejs/)`插件安装了这些工具的很多版本时,执行`shim-versions` 命令会返回:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
➜ asdf shim-versions node
|
||||
nodejs 14.8.0
|
||||
nodejs 14.17.3
|
||||
nodejs 16.5.0
|
||||
```
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
➜ asdf shim-versions npm
|
||||
nodejs 14.8.0
|
||||
nodejs 14.17.3
|
||||
@ -89,13 +89,13 @@ nodejs 16.5.0
|
||||
|
||||
2. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -112,13 +112,13 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -137,13 +137,13 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -164,13 +164,13 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -186,19 +186,19 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
4. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -214,19 +214,19 @@ source ~/.asdf/asdf.fish
|
||||
|
||||
以及使用以下命令移除补全功能:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf ~/.config/fish/completions/asdf.fish
|
||||
```
|
||||
|
||||
2. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -242,13 +242,13 @@ source "(brew --prefix asdf)"/libexec/asdf.fish
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -264,19 +264,19 @@ source /opt/asdf-vm/asdf.fish
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf (string join : -- $ASDF_DATA_DIR $HOME/.asdf)
|
||||
```
|
||||
|
||||
4. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -293,19 +293,19 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
以及使用以下命令卸载 `asdf` 模块:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -322,19 +322,19 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
以及使用以下命令卸载 `asdf` 模块:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -351,25 +351,25 @@ set edit:completion:arg-completer[asdf] = $_asdf:arg-completer~
|
||||
|
||||
以及使用以下命令卸载 `asdf` 模块:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -f ~/.config/elvish/lib/asdf.elv
|
||||
```
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
if (!=s $E:ASDF_DATA_DIR "") { rm -rf $E:ASDF_DATA_DIR } else { rm -rf ~/.asdf }
|
||||
```
|
||||
|
||||
4. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -391,13 +391,13 @@ compinit
|
||||
|
||||
2. 移除 `$HOME/.asdf` 目录:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -413,13 +413,13 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
brew uninstall asdf --force && brew autoremove
|
||||
```
|
||||
|
||||
3. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
@ -435,19 +435,19 @@ rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
|
||||
2. 用包管理器卸载:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
pacman -Rs asdf-vm
|
||||
```
|
||||
|
||||
3. 移除 `$HOME/.asdf` 目录
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
```
|
||||
|
||||
4. 执行以下命令移除 `asdf` 所有配置文件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
rm -rf "$HOME/.tool-versions" "$HOME/.asdfrc"
|
||||
```
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
|
||||
通过 Git URL 地址添加插件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add <name> <git-url>
|
||||
# asdf plugin add elm https://github.com/vic/asdf-elm
|
||||
```
|
||||
|
||||
或者通过插件存储库中的缩写添加插件:
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin add <name>
|
||||
# asdf plugin add erlang
|
||||
```
|
||||
@ -26,14 +26,14 @@ asdf plugin add <name>
|
||||
|
||||
## 列举已安装
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list
|
||||
# asdf plugin list
|
||||
# java
|
||||
# nodejs
|
||||
```
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list --urls
|
||||
# asdf plugin list
|
||||
# java https://github.com/halcyon/asdf-java.git
|
||||
@ -42,7 +42,7 @@ asdf plugin list --urls
|
||||
|
||||
## 列举缩写存储库中的所有插件
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin list all
|
||||
```
|
||||
|
||||
@ -50,13 +50,13 @@ asdf plugin list all
|
||||
|
||||
## 更新
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin update --all
|
||||
```
|
||||
|
||||
如果你想要更新特定的包,如下所示。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf plugin update <name>
|
||||
# asdf plugin update erlang
|
||||
```
|
||||
@ -65,7 +65,7 @@ asdf plugin update <name>
|
||||
|
||||
## 移除
|
||||
|
||||
```bash:no-line-numbers
|
||||
```bash
|
||||
asdf plugin remove <name>
|
||||
# asdf plugin remove erlang
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## 安装版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> <version>
|
||||
# asdf install erlang 17.3
|
||||
```
|
||||
@ -11,63 +11,63 @@ asdf install <name> <version>
|
||||
|
||||
## 安装最新稳定版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> latest
|
||||
# asdf install erlang latest
|
||||
```
|
||||
|
||||
安装给定字符串开头的最新稳定版本。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf install <name> latest:<version>
|
||||
# asdf install erlang latest:17
|
||||
```
|
||||
|
||||
## 列举已安装版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list <name>
|
||||
# asdf list erlang
|
||||
```
|
||||
|
||||
筛选出以给定字符串开头的版本。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list <name> <version>
|
||||
# asdf list erlang 17
|
||||
```
|
||||
|
||||
## 列举所有可用版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list all <name>
|
||||
# asdf list all erlang
|
||||
```
|
||||
|
||||
筛选出以给定字符串开头的版本。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf list all <name> <version>
|
||||
# asdf list all erlang 17
|
||||
```
|
||||
|
||||
## 显示最新稳定版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf latest <name>
|
||||
# asdf latest erlang
|
||||
```
|
||||
|
||||
显示以给定字符串开头的最新稳定版本。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf latest <name> <version>
|
||||
# asdf latest erlang 17
|
||||
```
|
||||
|
||||
## 设置当前版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf global <name> <version> [<version>...]
|
||||
asdf shell <name> <version> [<version>...]
|
||||
asdf local <name> <version> [<version>...]
|
||||
@ -93,7 +93,7 @@ asdf local <name> latest[:<version>]
|
||||
下面的示例在版本为 `1.4.0` 的 Elixir 项目上运行测试。
|
||||
版本格式与 `.tool-versions` 文件支持的版本格式相同。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
ASDF_ELIXIR_VERSION=1.4.0 mix test
|
||||
```
|
||||
|
||||
@ -103,14 +103,14 @@ ASDF_ELIXIR_VERSION=1.4.0 mix test
|
||||
|
||||
使用 `global`、`local` 或者 `shell` 设置系统,如上面的 [设置当前版本](#设置当前版本) 部分所述。
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf local <name> system
|
||||
# asdf local python system
|
||||
```
|
||||
|
||||
## 显示当前版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf current
|
||||
# asdf current
|
||||
# erlang 17.3 (set by /Users/kim/.tool-versions)
|
||||
@ -123,7 +123,7 @@ asdf current <name>
|
||||
|
||||
## 卸载版本
|
||||
|
||||
```shell:no-line-numbers
|
||||
```shell
|
||||
asdf uninstall <name> <version>
|
||||
# asdf uninstall erlang 17.3
|
||||
```
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Projects
|
||||
# Community Projects
|
||||
|
||||
Here are some community projects related to `asdf`:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user