Skip to content

Force style layer ids to lower case when creating layer templates #16

@aparlato

Description

@aparlato

I just went to use the new create-layer-templates script on a repo and ran into issues around layer id capitalization. This produced unexpected results where inconsistent capitalization across otherwise identical ids in styles failed equality checks to signal the same layer id was found but still overwrote outputted layer js files. I resolved this by changing all style layer ids to lower case in those styles and rerunning the script, but because the root cause was hard to pick out, we should have some handling in the script itself for these scenarios.

Capitalizing layer ids is never best practice, but we could account for this by forcing all style layers to lower case before breaking the layers out and comparing them to each other by style id. We should warn in the console when we do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions