babel-plugin-s2s-reducer-test-case

create reducer test using switch/case


Keywords
source-to-source, react, redux, babel, flowtype, prettier, typescript, javascript, plugin, automation, autocomplete, generator, s2s, babel-plugin, flow, concept
License
MIT
Install
npm install babel-plugin-s2s-reducer-test-case@0.4.6

Documentation

s2s


Build Status Build status Coverage Status tested with jest styled with prettier lerna MIT License Donate Code of Conduct Examples All Contributors

ๆ—ฅๆœฌ่ชž (readme ใฎๆœ€ๆ–ฐ็‰ˆใฏๆ—ฅๆœฌ่ชžใงใ™)

Ultra-fast coding by AST assist

See Examples examples

Concept

Monitor your coding and generate code in real time.

When the file names match, a single Babel plugin is executed and the formatted code is reflected in the editor.

  • You can use any editor.
  • Just Babel Plugin. No lock in.

Articles

ๆ—ฅๆœฌ่ชž

Users

SSconnect/ssconnect

If your company or project is using s2s, please open a PR and add yourself to this list (in alphabetical order please)

Quick Start

This is short example. It is enough to know the power of s2s :)

It's a first example that s2s initialize variables with the type infomations in Flow.

https://gyazo.com/c6de73c7c9044520fbbca95881c2a927

Preparation

Clone the repository and install dependencies.

$ git clone --depth=1 git@github.com:akameco/s2s.git
$ cd examples/getting-started
$ yarn

Usage

Check out s2s.config.js in the root of the project. This is a setting file.

watch set an direcotry that s2s watches, and plugins set an array of the plugins.

You can write easy the file if you are familer with webpack.

For more infomations, see Config.

module.exports = {
  watch: './**/*.js',
  plugins: [
    {
      test: /.*.js$/,
      plugin: ['s2s-variable-initializing'],
    },
  ],
}

Run

$ yarn run s2s

Opened src/index.js with your favorite editor, type var user: User and save it.

Would s2s generate default values?

It finishes Quick Start. Thanks!

See Getting Started Exmaple

Combine plugins

With combinations of some plugins, it makes s2s more useful.

This example is that s2s generates an constant of Action and an Action Creator, a Reducer, a test of Reducer when you wrote the definition of the type of Action.

plugins

More Info? See Examples.

More Examples

More Info? See Examples.

Official Plugins

Contributions

For all contributions we are always welcome. and we are working with all-contributors Specifications in this repository.

If you contributed our project with writting a code and test, then type this command.

$ yarn run add-contributors <GitHub Username> code,test

If you contibuted our project with adding documents and fixing them, then type this command.

$ yarn run add-contributors <GitHub Username> doc

For more infomations, refer all-contributors.

We will be welcome your contributions!

Contributors

Thanks goes to these wonderful people (emoji key):

akameco
akameco

๐Ÿ’ป โš ๏ธ ๐Ÿ’ฌ ๐Ÿค” ๐Ÿš‡
elzup
elzup

๐Ÿค” ๐Ÿ’ป
erukiti
erukiti

๐Ÿ“ ๐Ÿ’ป โš ๏ธ
asciian
asciian

๐Ÿ“–
kamijin_fanta
kamijin_fanta

๐Ÿ’ป ๐Ÿ“–
pocketberserker
pocketberserker

๐Ÿ“–
ygkn
ygkn

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT ยฉ akameco