【问题标题】:How to Create a Meteor App From Branch如何从 Branch 创建 Meteor 应用程序
【发布时间】:2014-03-30 07:15:37
【问题描述】:
我正在使用 Meteorite 并看到 repo 自述文件提到:
mrt create my-app --branch devel
但是,我在这样做时遇到了错误。 Meteor 说 --branch 不是识别命令。
更重要的是,如何使用特定的分支创建应用程序?或者我可以进入 smart.lock 并将 Meteor 的 git 放在我想要的分支中吗?
我知道我可以使用特定版本,但我很想知道如何改用特定分支。
【问题讨论】:
标签:
git
github
meteor
branch
meteorite
【解决方案1】:
我已将我的smart.json(不是smart.lock)文件中的meteor 条目更改为:
{
"meteor": {
"git": "https://github.com/meteor/meteor.git",
"branch": "shark"
},
"packages": {
...
}
}
除了branch 字段,您还可以使用tag 来指向特定版本。
【解决方案2】:
如 musicly_ut 所述,您可以在 smart.json 文件中执行以下操作:
{
"meteor": {
"git": "https://github.com/meteor/meteor.git",
"branch": "shark"
},
"packages": {
...
}
}
但是,除非您通过从应用目录运行“mrt”或“mrt run”(而不是运行“meteor”或“meteor run”来启动应用,否则在运行应用时,您将无法从此更改中受益)。这让我难倒了很长一段时间,所以我想我会在此处添加此内容,以供其他人沿着同一条路径行驶。感谢流星核心上的 Tom Coleman 提供的指针!