@teleporthq/teleport-plugin-react-base-component
Advanced tools
Comparing version 0.10.0-alpha.3 to 0.10.0-alpha.4
@@ -41,2 +41,3 @@ "use strict"; | ||
var teleport_shared_1 = require("@teleporthq/teleport-shared"); | ||
var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common"); | ||
var teleport_types_1 = require("@teleporthq/teleport-types"); | ||
@@ -72,3 +73,3 @@ var constants_1 = require("./constants"); | ||
}; | ||
jsxTagStructure = teleport_shared_1.createJSXSyntax(uidl.node, jsxParams, jsxOptions); | ||
jsxTagStructure = teleport_plugin_common_1.createJSXSyntax(uidl.node, jsxParams, jsxOptions); | ||
componentName = teleport_shared_1.UIDLUtils.getComponentClassName(uidl); | ||
@@ -91,3 +92,3 @@ pureComponent = utils_1.createPureComponent(componentName, stateDefinitions, jsxTagStructure); | ||
name: exportChunkName, | ||
content: teleport_shared_1.ASTBuilders.createDefaultExport(componentName), | ||
content: teleport_plugin_common_1.ASTBuilders.createDefaultExport(componentName), | ||
linkAfter: [componentChunkName], | ||
@@ -94,0 +95,0 @@ }); |
@@ -12,2 +12,3 @@ "use strict"; | ||
var teleport_shared_1 = require("@teleporthq/teleport-shared"); | ||
var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common"); | ||
exports.createPureComponent = function (name, stateDefinitions, jsxTagTree, t) { | ||
@@ -35,3 +36,3 @@ if (t === void 0) { t = types; } | ||
if (t === void 0) { t = types; } | ||
var defaultValueArgument = teleport_shared_1.ASTUtils.convertValueToLiteral(stateDefinition.defaultValue, stateDefinition.type); | ||
var defaultValueArgument = teleport_plugin_common_1.ASTUtils.convertValueToLiteral(stateDefinition.defaultValue, stateDefinition.type); | ||
return t.variableDeclaration('const', [ | ||
@@ -38,0 +39,0 @@ t.variableDeclarator(t.arrayPattern([ |
import { createPureComponent } from './utils'; | ||
import { createJSXSyntax, ASTBuilders, UIDLUtils, } from '@teleporthq/teleport-shared'; | ||
import { UIDLUtils } from '@teleporthq/teleport-shared'; | ||
import { createJSXSyntax, ASTBuilders, } from '@teleporthq/teleport-plugin-common'; | ||
import { ChunkType, FileType, } from '@teleporthq/teleport-types'; | ||
@@ -4,0 +5,0 @@ import { DEFAULT_COMPONENT_CHUNK_NAME, DEFAULT_EXPORT_CHUNK_NAME, DEFAULT_IMPORT_CHUNK_NAME, REACT_LIBRARY_DEPENDENCY, USE_STATE_DEPENDENCY, } from './constants'; |
import * as types from '@babel/types'; | ||
import { ASTUtils, StringUtils } from '@teleporthq/teleport-shared'; | ||
import { StringUtils } from '@teleporthq/teleport-shared'; | ||
import { ASTUtils } from '@teleporthq/teleport-plugin-common'; | ||
export const createPureComponent = (name, stateDefinitions, jsxTagTree, t = types) => { | ||
@@ -4,0 +5,0 @@ const arrowFunctionBody = createReturnExpressionSyntax(stateDefinitions, jsxTagTree); |
{ | ||
"name": "@teleporthq/teleport-plugin-react-base-component", | ||
"version": "0.10.0-alpha.3", | ||
"version": "0.10.0-alpha.4", | ||
"description": "A plugin for handling the skeleton/baseline of a React component", | ||
@@ -30,6 +30,7 @@ "author": "teleportHQ", | ||
"@babel/types": "^7.5.5", | ||
"@teleporthq/teleport-shared": "^0.10.0-alpha.3", | ||
"@teleporthq/teleport-types": "^0.10.0-alpha.3" | ||
"@teleporthq/teleport-plugin-common": "^0.10.0-alpha.4", | ||
"@teleporthq/teleport-shared": "^0.10.0-alpha.4", | ||
"@teleporthq/teleport-types": "^0.10.0-alpha.4" | ||
}, | ||
"gitHead": "51bd2bf8c93ea4e5bd6d3445e8baf47c21c82cf8" | ||
"gitHead": "8edece3f58b34ff7052c323471590460287fa50e" | ||
} |
import { createPureComponent } from './utils' | ||
import { UIDLUtils } from '@teleporthq/teleport-shared' | ||
import { | ||
@@ -6,4 +7,3 @@ createJSXSyntax, | ||
ASTBuilders, | ||
UIDLUtils, | ||
} from '@teleporthq/teleport-shared' | ||
} from '@teleporthq/teleport-plugin-common' | ||
@@ -10,0 +10,0 @@ import { |
import * as types from '@babel/types' | ||
import { ASTUtils, StringUtils } from '@teleporthq/teleport-shared' | ||
import { StringUtils } from '@teleporthq/teleport-shared' | ||
import { ASTUtils } from '@teleporthq/teleport-plugin-common' | ||
import { UIDLStateDefinition } from '@teleporthq/teleport-types' | ||
@@ -5,0 +6,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
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
312778
528
4