来自 Pattern Lab 的什么应该提交给 master 分支?

What from Pattern Lab should be committed to the master branch?

我正在使用 Pattern Lab 开始我们的第一个项目,我不知道我应该为我的团队承诺什么。 Twig 构建附带一个 .gitignore 文件,其中包含以下内容:

.DS_Store
composer.lock
config/*
export/*
packages/*
public/*
source/*
vendor/*

似乎至少应该提交 source/* 如果要共享它并且要有多个开发人员做出贡献。似乎还需要配置、包和供应商才能正确构建。我不确定导出是什么。

在 public 中,我很确定我可以忽略所有内容,因为它似乎从头开始构建得很好。我们可以在单独的本地机器上构建,也可以在服务器上构建。

所以这更像是应该忽略的东西?对于一起工作的团队?

.DS_Store
composer.lock
public/annotations/
public/css/
public/images/
public/js/
public/patternlab-components/
public/patterns/
public/
public/favicon.ico

我还缺少其他工作流程吗?如果某处有关于此的资源,我无法找到它,但我很乐意简单地指出那里。

Also posed in the repo,但没有看到最近的 activity。如果有回复会在这里更新。

GitHub 项目的维护者 dmolsen 在那里回复了我。 https://github.com/pattern-lab/patternengine-php-twig/issues/15#issuecomment-202633762

他的回应与该回购直接相关:

The .gitignore is primarily focused on folks who use Composer to build or update their projects. If you downloaded the zip and expect that to be your own true copy then you're correct, a fair bit of the .gitignore can be removed.

packages/ and vendor/ can definitely be removed in that scenario. They get created by the Composer build process. Just note that you'll only want one member of your team running Composer update and pushing changes to the repo. Anything else could get really messy.

Adding config/ and source/ was probably overkill on my part. It's more to make sure I don't accidentally commit something but that's not going to happen in my dev environment anymore. Feel free to take them out. I'll remove them in the future too.

I'd leave export/ in as it's similar to public/. It's just a place to export clean patterns to and wouldn't need to be tracked. That's a new and undocumented feature.

感谢 dmolsen 的回复!