@teleporthq/teleport-shared
Advanced tools
Comparing version
@@ -8,3 +8,3 @@ import { ComponentUIDL, UIDLStyleDefinitions, UIDLConditionalNode, UIDLElement, UIDLNode, UIDLStaticValue, UIDLAttributeValue, UIDLDynamicReference, UIDLRepeatContent, UIDLRepeatMeta, UIDLElementNode, UIDLDependency, UIDLStyleValue, UIDLStyleSheetContent, UIDLComponentStyleReference, UIDLRootComponent } from '@teleporthq/teleport-types'; | ||
export declare const getTemplateFileName: (component: ComponentUIDL) => string; | ||
export declare const getComponentFolderPath: (component: ComponentUIDL) => string[]; | ||
export declare const getComponentFolderPath: (component: ComponentUIDL, useFileNameForNavigation?: boolean) => string[]; | ||
export declare const getComponentClassName: (component: ComponentUIDL) => string; | ||
@@ -11,0 +11,0 @@ export declare const getRepeatIteratorNameAndKey: (meta?: UIDLRepeatMeta) => { |
@@ -65,3 +65,11 @@ "use strict"; | ||
exports.getTemplateFileName = getTemplateFileName; | ||
var getComponentFolderPath = function (component) { | ||
var getComponentFolderPath = function (component, useFileNameForNavigation) { | ||
if (useFileNameForNavigation === void 0) { useFileNameForNavigation = false; } | ||
if (useFileNameForNavigation) { | ||
var prefixPath = []; | ||
if (component.outputOptions && component.outputOptions.fileName) { | ||
prefixPath = component.outputOptions.fileName.split('/').slice(0, -1); | ||
} | ||
return prefixPath; | ||
} | ||
return component.outputOptions && component.outputOptions.folderPath | ||
@@ -68,0 +76,0 @@ ? component.outputOptions.folderPath |
@@ -8,3 +8,3 @@ import { ComponentUIDL, UIDLStyleDefinitions, UIDLConditionalNode, UIDLElement, UIDLNode, UIDLStaticValue, UIDLAttributeValue, UIDLDynamicReference, UIDLRepeatContent, UIDLRepeatMeta, UIDLElementNode, UIDLDependency, UIDLStyleValue, UIDLStyleSheetContent, UIDLComponentStyleReference, UIDLRootComponent } from '@teleporthq/teleport-types'; | ||
export declare const getTemplateFileName: (component: ComponentUIDL) => string; | ||
export declare const getComponentFolderPath: (component: ComponentUIDL) => string[]; | ||
export declare const getComponentFolderPath: (component: ComponentUIDL, useFileNameForNavigation?: boolean) => string[]; | ||
export declare const getComponentClassName: (component: ComponentUIDL) => string; | ||
@@ -11,0 +11,0 @@ export declare const getRepeatIteratorNameAndKey: (meta?: UIDLRepeatMeta) => { |
@@ -56,3 +56,11 @@ import { ASSETS_IDENTIFIER } from '../constants'; | ||
}; | ||
export var getComponentFolderPath = function (component) { | ||
export var getComponentFolderPath = function (component, useFileNameForNavigation) { | ||
if (useFileNameForNavigation === void 0) { useFileNameForNavigation = false; } | ||
if (useFileNameForNavigation) { | ||
var prefixPath = []; | ||
if (component.outputOptions && component.outputOptions.fileName) { | ||
prefixPath = component.outputOptions.fileName.split('/').slice(0, -1); | ||
} | ||
return prefixPath; | ||
} | ||
return component.outputOptions && component.outputOptions.folderPath | ||
@@ -59,0 +67,0 @@ ? component.outputOptions.folderPath |
{ | ||
"name": "@teleporthq/teleport-shared", | ||
"version": "0.24.0", | ||
"version": "0.25.0", | ||
"description": "A utility belt for the entire teleportHQ ecosystem", | ||
@@ -28,7 +28,7 @@ "author": "teleportHQ", | ||
"@babel/types": "^7.5.5", | ||
"@teleporthq/teleport-types": "^0.24.0", | ||
"@teleporthq/teleport-types": "^0.25.0", | ||
"jss": "^10.0.0", | ||
"jss-preset-default": "^10.0.0" | ||
}, | ||
"gitHead": "c361278e5b51cc1b2dcbd0b4f49dc92c07a80bf1" | ||
"gitHead": "0db44af7e94b3dd510c368e8b00b3b6b5ee7b61a" | ||
} |
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
168358
1.09%2405
0.67%+ Added
- Removed