0.3.6 • Published 6 years ago

babel-plugin-s2s-initial-state-creater v0.3.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

babel-plugin-s2s-initial-state-creater

s2s plugin: create initial-state from flow info

Install

$ npm install --save-dev babel-plugin-s2s-initial-state-creater

Example

IN:

// @flow
type Count = number
type State = { count: Count, isLoading: boolean }

const initialState: State = {}

OUT:

// @flow
type Count = number
type State = { count: Count, isLoading: boolean }

const initialState: State = { count: 0, isLoading: false }

Usage

{
  ['s2s-initial-state-creater']
}

Options

from

type: string required: true

Set target.js path

If you use s2s, you don't use this option. s2s handle it automatically.

0.3.6

6 years ago

0.3.5

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago