adobe/babel-plugin-transform-twist

Name: babel-plugin-transform-twist

Owner: Adobe Systems Incorporated

Description: Babel plugin for the Twist library

Created: 2017-12-21 18:20:17.0

Updated: 2018-01-22 18:51:43.0

Pushed: 2018-02-06 18:20:18.0

Homepage: null

Size: 68

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

babel-plugin-transform-twist

Build Status

This babel plugin provides support for the syntax features of twist that are common to any UI framework that you might use twist with. Specifically, it implements:

Quick Reference

Plugin Options:


autoImport: {
    'Store': {
        module: '@twist/core',
        export: 'StoreDecorator',
        inherits: {
            module: '@twist/core',
            export: 'Store'
        }
    }
    'ui:button': {
        module: 'my-ui-library',
        export: 'Button'
    }
}

With the above options, the following code:

re
s MyStore {
getView() {
    return <ui:button>My Button</ui:button>;
}

becomes:

rt { StoreDecorator, Store } from '@twist/core';
rt { Button } from 'my-ui-library';

reDecorator
s MyStore extends Store {
getView() {
    return <Button>My Button</Button>;
}


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.