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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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:
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>;
}