babel-plugin-transform-jsx-stylesheet
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -128,6 +128,6 @@ 'use strict'; | ||
if (cssParamIdentifiers.length === 1) { | ||
callExpression = t.variableDeclaration('const', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), cssParamIdentifiers[0])]); | ||
callExpression = t.variableDeclaration('var', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), cssParamIdentifiers[0])]); | ||
} else if (cssParamIdentifiers.length > 1) { | ||
var objectAssignExpression = t.callExpression(t.identifier('_mergeStyles'), cssParamIdentifiers); | ||
callExpression = t.variableDeclaration('const', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), objectAssignExpression)]); | ||
callExpression = t.variableDeclaration('var', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), objectAssignExpression)]); | ||
} | ||
@@ -134,0 +134,0 @@ |
{ | ||
"name": "babel-plugin-transform-jsx-stylesheet", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Transform stylesheet selector to style in JSX Elements.", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
@@ -44,3 +44,3 @@ import jSXStylePlugin from '../index'; | ||
} | ||
const _styleSheet = appStyleSheet;`); | ||
var _styleSheet = appStyleSheet;`); | ||
}); | ||
@@ -66,3 +66,3 @@ | ||
} | ||
const _styleSheet = appStyleSheet;`); | ||
var _styleSheet = appStyleSheet;`); | ||
}); | ||
@@ -92,3 +92,3 @@ | ||
const _styleSheet = _mergeStyles(appStyleSheet, styleStyleSheet);`); | ||
var _styleSheet = _mergeStyles(appStyleSheet, styleStyleSheet);`); | ||
}); | ||
@@ -118,3 +118,3 @@ | ||
const _styleSheet = _mergeStyles(appStyleSheet, styleStyleSheet);`); | ||
var _styleSheet = _mergeStyles(appStyleSheet, styleStyleSheet);`); | ||
}); | ||
@@ -153,4 +153,4 @@ | ||
} | ||
const _styleSheet = appStyleSheet;`); | ||
var _styleSheet = appStyleSheet;`); | ||
}); | ||
}); |
@@ -126,6 +126,6 @@ import path from 'path'; | ||
if (cssParamIdentifiers.length === 1) { | ||
callExpression = t.variableDeclaration('const', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), cssParamIdentifiers[0])]); | ||
callExpression = t.variableDeclaration('var', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), cssParamIdentifiers[0])]); | ||
} else if (cssParamIdentifiers.length > 1) { | ||
const objectAssignExpression = t.callExpression(t.identifier('_mergeStyles'), cssParamIdentifiers); | ||
callExpression = t.variableDeclaration('const', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), objectAssignExpression)]); | ||
callExpression = t.variableDeclaration('var', [t.variableDeclarator(t.identifier(STYLE_SHEET_NAME), objectAssignExpression)]); | ||
} | ||
@@ -132,0 +132,0 @@ |
16919