nb source download

Lấy NocoBase từ npm, Docker hoặc Git. --version là tham số phiên bản dùng chung cho cả ba source: npm dùng version package, Docker dùng image tag, Git dùng git ref.

Cách dùng

nb source download [flags]

Tham số

Tham sốKiểuMô tả
--yes, -ybooleanDùng giá trị mặc định và bỏ qua các câu hỏi tương tác
--verbosebooleanHiển thị output lệnh chi tiết
--localestringNgôn ngữ CLI prompt: en-US hoặc zh-CN
--source, -sstringCách lấy: docker, npm hoặc git
--version, -vstringVersion package npm, tag image Docker hoặc Git ref
--replace, -rbooleanThay thế khi thư mục đích đã tồn tại
--dev-dependencies, -D / --no-dev-dependenciesbooleanCó cài devDependencies khi dùng npm/Git hay không
--output-dir, -ostringThư mục đích để tải về, hoặc thư mục lưu Docker tarball
--git-urlstringĐịa chỉ Git repository
--docker-registrystringTên Docker registry, không bao gồm tag
--docker-platformstringPlatform Docker image: auto, linux/amd64, linux/arm64
--docker-save / --no-docker-savebooleanCó lưu Docker image thành tarball sau khi pull hay không
--npm-registrystringRegistry npm cho việc tải xuống và cài đặt dependency của npm/Git
--build / --no-buildbooleanCó build sau khi cài đặt dependency npm/Git hay không
--build-dtsbooleanCó sinh file khai báo TypeScript khi build npm/Git hay không

Ví dụ

nb source download
nb source download -y --source npm --version alpha
nb source download -y --source npm --version alpha --no-build
nb source download --source npm --version alpha --output-dir=./app
nb source download --source docker --version alpha --docker-registry=nocobase/nocobase --docker-platform=linux/arm64
nb source download -y --source docker --version alpha --docker-save -o ./docker-images
nb source download --source git --version alpha --git-url=git@github.com:nocobase/nocobase.git
nb source download --source git --version fix/cli-v2
nb source download -y --source npm --version alpha --build-dts
nb source download -y --source npm --version alpha --npm-registry=https://registry.npmmirror.com

Alias version

Với source Git, các dist-tag thường dùng sẽ resolve sang nhánh tương ứng: latestmain, betanext, alphadevelop.

Lệnh liên quan