Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sproutsocial/seeds-typography

Package Overview
Dependencies
Maintainers
44
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sproutsocial/seeds-typography - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

dist/seeds-typography.0.4.4.json

59

gulpfile.js

@@ -51,29 +51,36 @@ const fs = require('fs');

gulp.task('typography-docs', done => {
theo.plugins.file(typographyTokensPath).pipe(theo.plugins.transform('web')).pipe(
theo.plugins.getResult(result => {
const tokens = JSON.parse(result);
const tokensJson = tokens.propKeys.map(key => {
const prop = tokens.props[key];
return {
app: upperFirst(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
};
});
theo.plugins
.file(typographyTokensPath)
.pipe(theo.plugins.transform('web'))
.pipe(
theo.plugins.getResult(result => {
const tokens = JSON.parse(result);
const tokensJson = tokens.propKeys.map(key => {
const prop = tokens.props[key];
return {
app: upperFirst(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
};
});
fs.writeFileSync(
'dist/tokens.json',
`${JSON.stringify(tokensJson)}`
);
done();
})
);
fs.writeFileSync('dist/tokens.json', `${JSON.stringify(tokensJson)}`);
done();
})
);
});

@@ -80,0 +87,0 @@

{
"name": "@sproutsocial/seeds-typography",
"version": "0.4.4",
"version": "0.4.5",
"stability": "stable",

@@ -16,4 +16,4 @@ "description": "SEEDS Design System Typography Styles",

"devDependencies": {
"@sproutsocial/seeds-utils": "^0.1.10"
"@sproutsocial/seeds-utils": "^0.1.11"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc