Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Support Zeplin's new Spacing feature #17

Merged
merged 3 commits into from Apr 10, 2020
Merged

Support Zeplin's new Spacing feature #17

merged 3 commits into from Apr 10, 2020

Conversation

freak4pc
Copy link
Contributor

This allows leveraging Zeplin's new Spacing feature presented last week here:
https://blog.zeplin.io/introducing-spacing-and-rem-unit-5f06d10df5e3

You can use spacing in a Prism template as follows:

enum Spacing {
    {{% FOR spacing %}}
    static let {{% spacing.identity.camelcase %}} = {{% spacing.value %}}
    {{% END spacing %}}
}
<!-- This file was generated using Prism -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
    {{% FOR spacing %}}
    <dimen name="{{% spacing.identity.snakecase %}}">{{% spacing.value %}}dp</dimen>
    {{% END spacing %}}
</resources>

@freak4pc freak4pc added this to the 0.3 milestone Apr 10, 2020
@freak4pc freak4pc self-assigned this Apr 10, 2020
@codecov
Copy link

codecov bot commented Apr 10, 2020

Codecov Report

Merging #17 into master will increase coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
+ Coverage   98.52%   98.67%   +0.15%     
==========================================
  Files          19       19              
  Lines        1014     1131     +117     
==========================================
+ Hits          999     1116     +117     
  Misses         15       15              
Impacted Files Coverage Δ
Sources/ZeplinAPI/Models/Color.swift 100.00% <ø> (ø)
Sources/PrismCore/Models/AssetIdentity.swift 100.00% <100.00%> (ø)
Sources/PrismCore/Models/ProjectAssets.swift 100.00% <100.00%> (ø)
Sources/PrismCore/Prism.swift 96.36% <100.00%> (+0.85%) ⬆️
...rismCore/TemplateParser/TemplateParser+Token.swift 100.00% <100.00%> (ø)
...TemplateParser/TemplateParser+Transformation.swift 100.00% <100.00%> (ø)
...rces/PrismCore/TemplateParser/TemplateParser.swift 100.00% <100.00%> (ø)
Sources/ZeplinAPI/ZeplinAPI.swift 100.00% <100.00%> (ø)
Tests/TemplateParserSpec.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5790345...7ea45b6. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant