@sproutsocial/seeds-typography
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -45,3 +45,3 @@ const fs = require('fs'); | ||
getGulpTypographyTask('sketch', 'sketchtext.json', { | ||
dest: 'typography/_generated', | ||
dest: 'dist', | ||
appendVersion: true | ||
@@ -59,31 +59,20 @@ }) | ||
app: upperFirst(prop.name), | ||
sass: | ||
prop.category === 'font size' | ||
? `@include ${suitCssName(prop.package, prop.name)};` | ||
: sassVar(prop.package, prop.name), | ||
javascript: | ||
prop.category === 'font size' | ||
? `{ style: ${javascriptConst(prop.package, prop.name)} }` | ||
: javascriptConst(prop.package, prop.name), | ||
sass: prop.category === 'font size' | ||
? `@include ${suitCssName(prop.package, prop.name)};` | ||
: sassVar(prop.package, prop.name), | ||
javascript: typeof prop.value == 'object' ? `{ style: ${javascriptConst(prop.package, prop.name)} }` : javascriptConst(prop.package, prop.name), | ||
category: prop.category, | ||
value: | ||
typeof prop.value == 'object' | ||
? { | ||
fontSize: prop.value.value, | ||
lineHeightProportional: prop.value.rules && prop.value.rules['line-height'], | ||
lineHeightPx: prop.value.rules && prop.value.rules['line-height'] * parseInt(prop.value.value, 10) | ||
} | ||
: prop.value | ||
value: typeof prop.value == 'object' ? { | ||
fontSize: prop.value.value, | ||
lineHeightProportional: prop.value.rules && prop.value.rules['line-height'], | ||
lineHeightPx: prop.value.rules && prop.value.rules['line-height'] * parseInt(prop.value.value, 10) | ||
} : prop.value | ||
}; | ||
}); | ||
makeDir('typography/_generated/').then(() => { | ||
fs.writeFileSync( | ||
'typography/_generated/typography.html', | ||
`<!-- GENERATED BY GULP - DO NOT EDIT -->\n\n<script>window.seedsTypography = ${JSON.stringify( | ||
tokensJson | ||
)};</script>` | ||
); | ||
done(); | ||
}); | ||
fs.writeFileSync( | ||
'dist/tokens.json', | ||
`${JSON.stringify(tokensJson)}` | ||
); | ||
done(); | ||
}) | ||
@@ -90,0 +79,0 @@ ); |
{ | ||
"name": "@sproutsocial/seeds-typography", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"stability": "stable", | ||
@@ -16,4 +16,4 @@ "description": "SEEDS Design System Typography Styles", | ||
"devDependencies": { | ||
"@sproutsocial/seeds-utils": "^0.1.9" | ||
"@sproutsocial/seeds-utils": "^0.1.10" | ||
} | ||
} |
92167
19
128