@teleporthq/teleport-plugin-react-styled-components
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -33,2 +33,3 @@ import { | ||
uidl: uidlSample, | ||
options: {}, | ||
chunks: [componentChunk], | ||
@@ -58,2 +59,3 @@ dependencies: {}, | ||
uidl: uidlSample, | ||
options: {}, | ||
chunks: [componentChunk], | ||
@@ -84,2 +86,3 @@ dependencies: {}, | ||
uidl: uidlSample, | ||
options: {}, | ||
chunks: [], | ||
@@ -86,0 +89,0 @@ dependencies: {}, |
@@ -43,2 +43,3 @@ "use strict"; | ||
var ast_jsx_utils_1 = require("@teleporthq/teleport-shared/lib/utils/ast-jsx-utils"); | ||
var ast_builders_1 = require("@teleporthq/teleport-shared/lib/builders/ast-builders"); | ||
exports.createPlugin = function (config) { | ||
@@ -76,3 +77,3 @@ var _a = config || {}, _b = _a.componentChunkName, componentChunkName = _b === void 0 ? 'react-component' : _b, _c = _a.importChunkName, importChunkName = _c === void 0 ? 'import-local' : _c; | ||
if (timesReferred_1 > 1) { | ||
root_1.openingElement.attributes.push(ast_jsx_utils_1.createJSXSpreadAttribute('props')); | ||
root_1.openingElement.attributes.push(ast_builders_1.createJSXSpreadAttribute('props')); | ||
} | ||
@@ -79,0 +80,0 @@ root_1.openingElement.name.name = className; |
{ | ||
"name": "@teleporthq/teleport-plugin-react-styled-components", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "A plugin for injecting the styles through styled-components inside React components", | ||
@@ -22,10 +22,11 @@ "author": "teleportHQ", | ||
"build": "tsc", | ||
"build:watch": "tsc -w" | ||
"build:watch": "tsc -w", | ||
"build:watch:component": "tsc -w" | ||
}, | ||
"dependencies": { | ||
"@babel/types": "^7.3.3", | ||
"@teleporthq/teleport-shared": "^0.7.0", | ||
"@teleporthq/teleport-types": "^0.7.0" | ||
"@teleporthq/teleport-shared": "^0.8.0", | ||
"@teleporthq/teleport-types": "^0.8.0" | ||
}, | ||
"gitHead": "7c289105c6f0d9d0d44b57be86dac08f6663f2cc" | ||
"gitHead": "4b92261575450bb5565a1515ebed95a77273d2a1" | ||
} |
@@ -8,6 +8,4 @@ import { ComponentPluginFactory, ComponentPlugin } from '@teleporthq/teleport-types' | ||
import { dashCaseToUpperCamelCase } from '@teleporthq/teleport-shared/lib/utils/string-utils' | ||
import { | ||
createJSXSpreadAttribute, | ||
addDynamicAttributeOnTag, | ||
} from '@teleporthq/teleport-shared/lib/utils/ast-jsx-utils' | ||
import { addDynamicAttributeOnTag } from '@teleporthq/teleport-shared/lib/utils/ast-jsx-utils' | ||
import { createJSXSpreadAttribute } from '@teleporthq/teleport-shared/lib/builders/ast-builders' | ||
@@ -52,5 +50,3 @@ interface StyledComponentsConfig { | ||
throw new Error( | ||
`Error running transformDynamicStyles in reactStyledComponentsPlugin. Unsupported styleValue.content.referenceType value ${ | ||
styleValue.content.referenceType | ||
}` | ||
`Error running transformDynamicStyles in reactStyledComponentsPlugin. Unsupported styleValue.content.referenceType value ${styleValue.content.referenceType}` | ||
) | ||
@@ -57,0 +53,0 @@ }) |
Sorry, the diff of this file is not supported yet
21550
+ Added@teleporthq/teleport-shared@0.8.1(transitive)
+ Added@teleporthq/teleport-types@0.8.1(transitive)
- Removed@teleporthq/teleport-shared@0.7.0(transitive)
- Removed@teleporthq/teleport-types@0.7.0(transitive)