Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Allow `npm create void` and `void init` to run without prompts

Đã đóng
#491 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #495 của @ashunar0 — đã merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
57/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
node.js, typescript, vite
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

Start by reading the void init and create-void command entry points and the AGENTS.md step mentioned in the issue, which already checks process.env.CI || !process.stdin.isTTY. Trace how the starter, toolchain, framework, database and deploy choices reach the prompts. Done means both commands accept those choices as flags, create-void passes them through, and missing non-interactive answers produce a non-zero exit with the required flag named.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

In a non-interactive environment (CI, scripts, coding agents), npm create void prints "✓ Created" without scaffolding anything:

$ npx [email protected] my-app < /dev/null; echo "exit=$?"
◇ Scaffolding starter...
● Empty project detected. Scaffolding a Pages starter...
› Choose a Pages scaffold toolchain:
  › Vite+: Uses the Vite+ toolchain and vp commands.
    Vite
  ↑/↓ navigate · Enter confirm
◇ Installing starter dependencies...
✓ Created my-app
cd my-app && npm run dev
exit=0
$ ls -A my-app
node_modules  package-lock.json  package.json

void init shows the first prompt, then exits with code 0 without creating anything. create-void treats that as success and carries on.

There is also no way to pass the choices as flags. void init only accepts --tsconfig, --git and --github; the starter, toolchain, framework, database and deploy target can only be chosen interactively.

Two requests:

  1. Let void init take the choices as flags, and let npm create void pass them through (like --template in create-vite).
  2. When there is no interactive terminal and an answer is missing, exit with a non-zero code and say which flag is needed.

The AGENTS.md step already checks process.env.CI || !process.stdin.isTTY and skips itself, so the same check could be used here.

Ngôn ngữ chính
TypeScript
Star
402
Fork
32
Merge trung bình
11 giờ 52 phút
Pull request đã merge (30 ngày)
88

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của voidzero-dev/void

Tất cả issue của voidzero-dev/void

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.