您将如何处理 HAML/ERB 混合团队?

发布于 2024-09-16 15:20:23 字数 319 浏览 1 评论 0原文

我是 Haml/Sass 的忠实粉丝。现在我和一位设计师一起工作,他更喜欢 Erb,但不会说 Haml 语。

我发现与 Erb 一起工作大大减慢了我的速度,而且他必须支付那段时间的费用似乎不公平(他是客户,我按小时付费)。

erb->haml 转换器现在工作得很好,但我不知道是否有办法走向另一个方向。

如果我可以在 Haml/Sass 中工作,然后在提交到存储库时自动将其转换为 erb/css,而当我拉取他的更改时则自动将其转换为 erb/css,那该多好啊?

也许我在做梦,但我有兴趣听听其他团队如何处理这个困境。

你做什么工作?

I'm a big Haml/Sass fan. Right now I work with a designer who prefers Erb and doesn't speak Haml.

I find that working with Erb is slowing me down considerably, and it doesn't seem fair that he should have to pay for that time (he's the client & I'm paid hourly).

The erb->haml converter works quite well these days, but I don't know if there is a way to go the other direction.

How great would it be if I could work in Haml/Sass, but then automatically convert it to erb/css when I commit to the repo, and vice versa when I pull his changes?

Maybe I'm dreaming, but I'm interested in hearing how other teams have handled this dilemma.

What do you do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

止于盛夏 2024-09-23 15:20:23

在一个团队中,你们都同意一套技术,并且坚持使用它们,即使这意味着您无法使用您最喜欢的技术并且您的工作效率会稍微降低。不管你喜欢与否,ERB 是 Rails 的默认渲染引擎,你应该使用它,除非你能同意使用其他引擎。

努力让你的队友尝试一下 Haml,帮助他们学习并进行实验。也许他们会喜欢它。如果没有,坚持使用 ERB 或作为一个团队同意 Haml 更好,然后你的其他同事就会接受它。但在这种情况下,不要试图鱼与熊掌兼得。

On a team, you all agree on a set of technologies and you stick to them even if that means you don't get to use your favorite technology and that you're slightly less productive. Like it or not ERB is the default rendering engine for rails, and that's what you should use unless you can get agreement to use something else.

Work on getting your teammate to give Haml a try and help them learn it and experiment with it. Maybe they'll come to like it. If not, stick with ERB or agree as a team that Haml is better and then your other coworker will have suck it up. But don't try to have your cake and eat it too in a case like this.

半山落雨半山空 2024-09-23 15:20:23

我不会像这样混合两种技术。事情很简单,两者都只是生成 HTML。然而,由于团队中可能有更多成员不了解 haml,我认为您将不得不开始使用 ERB。要么他们就必须开始学习 haml。尝试在两种不同的模板语言上一起工作根本不会有很好的效果。我知道 haml 很棒,但你并不总是能使用它。

I wouldn't mix two technologies like this. It's such a simple thing, both just produce HTML. However, since it's likely that more members of the team do not know haml, I think you're going to have to start using ERB. Either that or they're going to have to start learning haml. Trying to work together on two different template languages is not going to work well at all. I know haml is great, but you don't always get to use it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文