YAMLResume

create-yamlresume

create-yamlresume 帮助您使用一行命令创建新的 YAMLResume 项目。

使用方法

npx create-yamlresume my-resume

# or

npm init yamlresume my-resume
pnpm create yamlresume my-resume
yarn create yamlresume my-resume
bun create yamlresume my-resume

功能

此工具将:

  1. 使用您的项目名称创建新目录
  2. 创建基本的 Node.js 项目结构,包括:
    • 带有 YAMLResume 依赖和有用脚本的 package.json
    • 带有适当排除规则的 .gitignore 文件
    • 带有基本使用说明的 README.md
  3. 安装所有必要的依赖
  4. 使用 yamlresume new 创建新的示例简历文件
  5. 显示可用命令和后续步骤

示例会话

$ pnpm create yamlresume
✔ What is your project name? … yamlresume
ℹ Using pnpm.

✔ What should your resume file be called? (without .yml extension) … resume
◐ Creating YAMLResume project in /private/tmp/yamlresume...
◐ Installing dependencies with pnpm...
Packages: +59
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 59, reused 59, downloaded 0, added 59, done

dependencies:
+ yamlresume 0.7.5

Done in 4s using pnpm v10.6.3
✔ Dependencies installed successfully!
◐ Creating resume file resume.yml...
✔ Created resume.yml successfully.
◐ Initializing git repository...
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>
Initialized empty Git repository in /tmp/yamlresume/.git/
✔ Git repository initialized!
[master (root-commit) 53c6210] init a new YAMLResume project
 4 files changed, 421 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 README.md
 create mode 100644 package.json
 create mode 100644 resume.yml
✔ Initial commit created!

✨ Project created successfully!

Next steps:
ℹ   1. cd yamlresume
ℹ   2. Edit your resume: resume.yml
ℹ   3. Build your resume: pnpm run build
ℹ   4. Watch for changes: pnpm run dev
ℹ   5. Show all commands: pnpm run yamlresume help

Learn more:
ℹ   🏠 Homepage: https://yamlresume.dev
ℹ   📖 Documentation: https://yamlresume.dev/docs/
ℹ   🎨 Templates: https://yamlresume.dev/docs/layout/templates
ℹ   📝 Schema: https://yamlresume.dev/docs/compiler/schema

项目结构

生成的项目如下所示:

my-resume/
├── package.json          # 带有 yamlresume 依赖的项目配置
├── .gitignore            # Git 忽略规则
├── README.md             # 项目文档
└── resume.yml            # 您的 YAML 简历(您选择的文件名)

可用命令

在生成的项目中,您可以运行:

  • npm run build - 将您的简历构建为 PDF
  • npm run dev - 监听变化并自动重新构建
  • npm run validate - 根据模式验证您的简历
  • npm run yamlresume - 运行 YAMLResume CLI
Edit on GitHub

Last updated on