cli
cli copied to clipboard
[Proposing new feature] zeplin pull
Hi, when this latest version was released, I tough it had some tool to update projects with the styleguide present on Zeplin. My suggestion is to create a new command called pull which does:
- Based on the configuration (.zeplin/components.json) and some reference for the wanted plugin (example: styled-components), generate the styleguide theme object with all the configuration, example:
// generated styleguide
export default {
colors: {
primary: '#cccccc',
'primary-light': '#cccccd',
white: "#ffffff"
},
typography: {
h1: {
'font-family': 'SFUIText',
'font-size': '16px',
'font-weight': 'bold',
color: '#000000',
}
},
components: {
// this is based on the selected extension to transform in a desired way
Button: theme => ({
color: theme.color.white,
}),
H1: theme => ({
...theme.typography.h1,
})
}
}
So, the idea behind this, is every time I execute zeplin pull, it generates the theme object for a destination path and it updates our projecto dynamically, syncing all the designers modifications with the source code.