1.0.1 • Published 7 years ago

babel-plugin-cerebral-proxy-tags v1.0.1

Weekly downloads
12
License
MIT
Repository
github
Last release
7 years ago

babel-plugin-cerebral-proxy-tags Build Status codecov

In Cerebral v2 tags are a way to target input, state, props or signals. They are implemented using a new ES2015 feature called template tags.

I implemented these using Proxy Object in cerebral-proxy-tags. This babel-plugin is tracking the usage of these specific proxy tags and translates them into the tagged template syntax.

Usage

Instead of this way:

import {set} from 'cerebral/operators'
import {state} from 'cerebral/tags'

export default [
  set(state`foo.bar`, 'baz')
]

You can write the same like showen bellow and it will get transpiled automatically.

import {set} from 'cerebral/operators'
import {state} from 'cerebral-proxy-tags' // or 'cerebral/proxies'

export default [
  set(state.foo.bar, 'baz') // <-- usage
]
1.0.1-beta.3

7 years ago

1.0.1-beta.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago