@lightspeed/cirrus-tokens
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="3.2.0"></a> | ||
# [3.2.0](https://github.com/lightspeedretail/cirrus/compare/@lightspeed/cirrus-tokens@3.1.0...@lightspeed/cirrus-tokens@3.2.0) (2018-11-13) | ||
### Features | ||
* **tokens:** Add theme generation-script. Add new core package ([#511](https://github.com/lightspeedretail/cirrus/issues/511)) ([463af70](https://github.com/lightspeedretail/cirrus/commit/463af70)) | ||
<a name="3.1.0"></a> | ||
@@ -8,0 +20,0 @@ # [3.1.0](https://github.com/lightspeedretail/cirrus/compare/@lightspeed/cirrus-tokens@3.0.0...@lightspeed/cirrus-tokens@3.1.0) (2018-11-12) |
{ | ||
"name": "@lightspeed/cirrus-tokens", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Cirrus's Foundation", | ||
@@ -13,3 +13,4 @@ "main": "index.js", | ||
"scripts": { | ||
"prepublish": "node scripts/pre-publish.js" | ||
"generate-theme": "node ./scripts/generate-theme.js && prettier --write ./theme/default.js", | ||
"prepublish": "node scripts/pre-publish.js && yarn generate-theme" | ||
}, | ||
@@ -19,3 +20,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "5db4e503b363e40e8c1fe74f750597cb8551dadf" | ||
"gitHead": "370bb38aa1cc5e9a3dfb5da66fd71ea0626c2f2e" | ||
} |
@@ -37,7 +37,10 @@ const { pxToRem } = require('./utils'); | ||
const letterSpacingValues = [0.5, 1.0, 1.5]; | ||
const letterSpacingValues = ['normal', 0.5, 1.0, 1.5]; | ||
const letterSpacings = letterSpacingValues.reduce((obj, value, index) => { | ||
const scale = index + 1; | ||
const key = typeof value === 'string' ? value : index; | ||
const nextValue = typeof value === 'string' ? value : pxToRem(value); | ||
// eslint-disable-next-line no-param-reassign | ||
obj[`letter-spacing-${scale}`] = pxToRem(value); | ||
obj[`letter-spacing-${key}`] = nextValue; | ||
return obj; | ||
@@ -44,0 +47,0 @@ }, {}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
54452
24
506