@dcl/sdk-命令
用于Decentrand场景开发的CLI工具.
概览
这个软件包为创建,开发,并部署Decentrand场景提供了命令行工具. 它包括下列命令:
- 启动新场景项目
- 启动本地开发服务器
- 建筑场景
- 测试和验证场景
- 现场部署的管理
安装
npm install @dcl/sdk-commands
使用量
SDK 命令通过 npx 运行您工程中安装的版本 :
创建新场景
npx @dcl/sdk-commands init
启动开发服务器
npx @dcl/sdk-commands start
构建场景
npx @dcl/sdk-commands build
部署场景
npx @dcl/sdk-commands deploy
当目标服务器支持时,大场景会分批上传. 在部署时,链接服务器在 /api/deploy数字 : GET 返回状态(JSON,或服务器发送事件) Accept: text/event-stream和 DELETE 取消这个 取消需要一个 X-Deploy-Token 标题, 设置为 --deploy-token <token> (16+字符)或随机每跑;浏览器在链接器 URL 片段(/#token=...) (中文(简体) ).
导出静态内容
npx @dcl/sdk-commands export-static
包装智能可穿
npx @dcl/sdk-commands pack-smart-wearable
管理查询
npx @dcl/sdk-commands quests
发展
构建软件包
# Build all packages in the monorepo
make build
测试
# Run all tests in the monorepo
make test
# Run tests for a specific file
make test FILES="--watch packages/@dcl/sdk-commands/src/path/to/test.spec.ts"
发展指挥部
关于地方发展:
# Clean all build artifacts and reinstall dependencies
make clean && make install
# Format and fix linting issues
make lint-fix
# Update dependencies across packages
make sync-deps
文档
关于使用CLI工具的详细文件,访问: