[英]How to build vapor toolbox with vapor 3.x
I would like to build vapor toolbox with the latest vapor 3.x. 我想用最新的蒸气3.x构建蒸气工具箱。
However, Package.swift of vapor toolbox still has Vapor 2.x dependency. 但是,蒸气工具箱的Package.swift仍具有Vapor 2.x依赖性。
.Package(url: "https://github.com/vapor/vapor.git", majorVersion: 2)
Does anyone knows why? 有谁知道为什么?
There's no need to build it form source. 无需从源代码构建它。
Your question is missing some information though. 您的问题虽然缺少一些信息。 What are you trying to achieve ?
您想达到什么目的?
If you want to create a new Vapor project, you need to use the new
command. 如果要创建新的Vapor项目,则需要使用
new
命令。 Since Vapor 3 hasn't been officially released yet (follow vapor/#1647 and documentation/#302 for updates), you'll need to specify the beta branch: 由于Vapor 3尚未正式发布(请按照vapor /#1647和文档/#302进行更新),因此需要指定beta分支:
vapor new --branch=beta
Add the following to your Package.swift file: 将以下内容添加到Package.swift文件中:
.package(url: "https://github.com/vapor/vapor.git", .branch("gm"))
Once it's released, you'll need to change it to: 发布后,您需要将其更改为:
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
Update Vapor: 更新蒸气:
Install new vapor app 安装新的蒸气应用
Or just change the package version 或者只是更改软件包版本
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0-rc.2"),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.