@teleporthq/teleport-component-generator
TypeScript icon, indicating that this package has built-in type declarations

0.32.10 • Public • Published

teleport-component-generator

Bare-bone component generator on top of which you can add plugins, mappings and post processing functions.

This package is part of the teleport ecosystem. For a complete guide, check out the official documentation.

Install

npm install @teleporthq/teleport-component-generator

or

yarn add @teleporthq/teleport-component-generator

Usage

import generator from '@teleporthq/teleport-component-generator'

generator.addMapping({ /*...*/ }) // Add a mapping object for UIDL element types

generator.addPlugin(plugin1) // Add the plugins in the order in which they will be called
generator.addPlugin(plugin2)
/* ... */

generator.addPostProcessor(prettierJS) // Add any number of post-processor functions
generator.addPostProcessor(/* ... */)

const result = await generator.generateComponent(uidl)

/@teleporthq/teleport-component-generator/

    Package Sidebar

    Install

    npm i @teleporthq/teleport-component-generator

    Weekly Downloads

    70

    Version

    0.32.10

    License

    MIT

    Unpacked Size

    139 kB

    Total Files

    61

    Last publish

    Collaborators

    • ionutpasca
    • teleporthq.io