Rename ~ helper #1932

Closed
matthewp opened this Issue Sep 17, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@matthewp
Contributor

matthewp commented Sep 17, 2015

Because of #1699 we need to rename it. A few options:

{{root "img/foo.png"}}

{{base "img/foo.png"}}

{{join "img/foo.png"}}

{{join-root "img/foo.png"}}

{{join-base "img/foo.png"}}

{{base-url "img/foo.png"}}

@matthewp matthewp added this to the 2.3.0 milestone Sep 17, 2015

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Sep 17, 2015

Contributor

I like either join or join-base because that is what they do. join-base is more accurate.

Contributor

matthewp commented Sep 17, 2015

I like either join or join-base because that is what they do. join-base is more accurate.

@Alfredo-Delgado

This comment has been minimized.

Show comment
Hide comment
@Alfredo-Delgado

Alfredo-Delgado Sep 17, 2015

Contributor

Why not {{baseUrl}}"img/foo.png"?

Contributor

Alfredo-Delgado commented Sep 17, 2015

Why not {{baseUrl}}"img/foo.png"?

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Sep 17, 2015

Contributor

@Alfredo-Delgado So this would be a helper that simply returns the baseUrl as a string, doesn't do any joining, and use normal stache to do whatever you want? Not a bad idea... going to think about that some more.

Contributor

matthewp commented Sep 17, 2015

@Alfredo-Delgado So this would be a helper that simply returns the baseUrl as a string, doesn't do any joining, and use normal stache to do whatever you want? Not a bad idea... going to think about that some more.

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Sep 17, 2015

Contributor

Is the normal convention to kebab-case or camelCase helper names?

Contributor

matthewp commented Sep 17, 2015

Is the normal convention to kebab-case or camelCase helper names?

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Sep 18, 2015

Contributor

@Alfredo-Delgado That wouldn't work with {{baseUrl}}../../path.png sorta thing. But a cool idea. We could actually make {{#join}}../../path.png{{/join}} work.

@matthewp for now, I'm going to go with joinBase. Most helpers are camelCase. I'm going to make this change now b/c I need it for tests to pass.

Contributor

justinbmeyer commented Sep 18, 2015

@Alfredo-Delgado That wouldn't work with {{baseUrl}}../../path.png sorta thing. But a cool idea. We could actually make {{#join}}../../path.png{{/join}} work.

@matthewp for now, I'm going to go with joinBase. Most helpers are camelCase. I'm going to make this change now b/c I need it for tests to pass.

@justinbmeyer justinbmeyer self-assigned this Sep 18, 2015

matthewp added a commit that referenced this issue Sep 21, 2015

Rename ~ helper to joinBase
We need to rename the `~` helper because in 2.3 `~` is going to coerce a
scope value into a compute. Fixes #1932
@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Oct 2, 2015

Contributor

This is in minor.

Contributor

matthewp commented Oct 2, 2015

This is in minor.

@matthewp matthewp closed this Oct 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment