From 31e79804cdbc0b57ec2f84bf93ab40b6f29c7512 Mon Sep 17 00:00:00 2001 From: Adam Putinski Date: Fri, 2 Oct 2015 16:34:56 -0400 Subject: [PATCH] Remove "cssProperties" string parsing --- package.json | 2 +- src/props/index.js | 3 --- test/props/index.js | 9 +-------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 59765cf..19f1e48 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "theo", - "version": "4.1.0", + "version": "4.2.0", "description": "A set of Gulp plugins for transforming and formatting Design Properties", "keywords": [ "css", diff --git a/src/props/index.js b/src/props/index.js index ec80af3..5c7989d 100755 --- a/src/props/index.js +++ b/src/props/index.js @@ -326,9 +326,6 @@ registerFormat('aura.tokens', json => { let props = _.map(json.props, prop => { let name = camelCase(prop.name); let cssProperties = (() => { - if (_.isString(prop.cssProperties)) { - return `property="${prop.cssProperties}"`; - } if (_.isArray(prop.cssProperties)) { return `property="${prop.cssProperties.join(',')}"`; } diff --git a/test/props/index.js b/test/props/index.js index cde9338..d6a61a4 100644 --- a/test/props/index.js +++ b/test/props/index.js @@ -815,20 +815,13 @@ describe('$props:formats', function() { assert(_.has(n.$, 'value')); }); }); - it('aura:token nodes have a "property" attribute if the token has a "cssProperties" key (array)', function() { + it('aura:token nodes have a "property" attribute if the token has a "cssProperties" key', function() { var token = _.find(result['aura:tokens']['aura:token'], function(n) { return n.$.name === 'spacingNone'; }); assert(_.has(token, '$.property')); assert(token.$.property === 'width,height,padding,margin'); }); - it('aura:token nodes have a "property" attribute if the token has a "cssProperties" key (string)', function() { - var token = _.find(result['aura:tokens']['aura:token'], function(n) { - return n.$.name === 'stageLeftWidth'; - }); - assert(_.has(token, '$.property')); - assert(token.$.property === 'width'); - }); it('has aura:import nodes', function() { assert(_.has(result['aura:tokens'], 'aura:import')); });