Skip to content

Commit

Permalink
Remove "cssProperties" string parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Putinski committed Oct 2, 2015
1 parent 8b60c29 commit 31e7980
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion 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",
Expand Down
3 changes: 0 additions & 3 deletions src/props/index.js
Expand Up @@ -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(',')}"`;
}
Expand Down
9 changes: 1 addition & 8 deletions test/props/index.js
Expand Up @@ -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'));
});
Expand Down

0 comments on commit 31e7980

Please sign in to comment.