Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akameco/s2s

Coding time Compile. A tool to write code fastest.
https://github.com/akameco/s2s

autocomplete automation babel babel-plugin concept flow flowtype generator javascript plugin prettier react redux s2s source-to-source typescript

Last synced: about 24 hours ago
JSON representation

Coding time Compile. A tool to write code fastest.

Awesome Lists containing this project

README

        

[![s2s](https://github.com/akameco/logos/blob/master/s2s/s2s-logo.png?raw=true)](https://github.com/akameco/s2s)


[![Build Status](https://travis-ci.org/akameco/s2s.svg?branch=master)](https://travis-ci.org/akameco/s2s)
[![Build status](https://ci.appveyor.com/api/projects/status/gmcngvce43rxf21c/branch/master?svg=true)](https://ci.appveyor.com/project/akameco/s2s/branch/master)
[![Coverage Status](https://coveralls.io/repos/github/akameco/s2s/badge.svg?branch=master)](https://coveralls.io/github/akameco/s2s?branch=master)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
[![MIT License](https://img.shields.io/npm/l/nps.svg?style=flat-square)](./license)
[![Donate](https://img.shields.io/badge/%EF%BC%84-support-green.svg?style=flat-square)](http://amzn.asia/bO78HzR)
[![Code of Conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square)](./CODE_OF_CONDUCT.md)
[![Examples](https://img.shields.io/badge/%F0%9F%92%A1-examples-8C8E93.svg?style=flat-square)](./examples)
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)

**[日本語](./docs/ja)** (readme の最新版は日本語です)

- [Ultra-fast coding by AST assist](#ultra-fast-coding-by-ast-assist)
- [Concept](#concept)
- [Articles](#articles)
- [日本語](#%E6%97%A5%E6%9C%AC%E8%AA%9E)
- [Users](#users)
- [Quick Start](#quick-start)
- [Preparation](#preparation)
- [Usage](#usage)
- [Run](#run)
- [Combine plugins](#combine-plugins)
- [More Examples](#more-examples)
- [Official Plugins](#official-plugins)
- [Contributions](#contributions)
- [Contributors](#contributors)
- [License](#license)

## Ultra-fast coding by AST assist

See Examples [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

### 日本語

- [さよならボイラープレート。s2s による高速 redux アプリケーション構築](https://qiita.com/akameco/items/e1489c6bbf3439ec6ca4)
- [s2s: redux における reducer のテスト。あなたがテストを書く必要はないかも知れない](https://qiita.com/akameco/items/66a2232df0e95e5bfe31)

## Users

[SSconnect/ssconnect](https://github.com/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](https://i.gyazo.com/c6de73c7c9044520fbbca95881c2a927.gif)](https://gyazo.com/c6de73c7c9044520fbbca95881c2a927)

### Preparation

Clone the repository and install dependencies.

```
$ git clone --depth=1 [email protected]: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](./docs/en/config.md).

```js
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](./examples/getting-started)

## 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](https://camo.qiitausercontent.com/2b3fc744eda2c6e569f437d8006c765c78bc9f20/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f31353331392f37306239386664642d373338622d646464322d663866352d3932343435353763643734322e676966)

More Info? See Examples.

## More Examples

- [Shopping Cart](./examples/shopping-cart) Combination of Redux and Flow.
- [cndlhvn/s2s-redux-actions-sample](https://github.com/cndlhvn/s2s-redux-actions-sample) redux-actions + redux-saga.

More Info? See Examples.

## Official Plugins

- [**babel-plugin-s2s-action-types**
generate redux action types](https://github.com/akameco/s2s/tree/master/packages/babel-plugin-s2s-action-types)
- [**babel-plugin-s2s-action-creater**
generate redux action creater](https://github.com/akameco/s2s/tree/master/packages/babel-plugin-s2s-action-creater)
- [**babel-plugin-s2s-action-root**
compose flow + redux action types](https://github.com/akameco/s2s/tree/master/packages/babel-plugin-s2s-action-root)
- [**babel-plugin-s2s-state-root**
compose flow + redux state types](https://github.com/akameco/s2s/tree/master/packages/babel-plugin-s2s-state-root)
- [**babel-plugin-s2s-reducer-root**
compose redux reducer](https://github.com/akameco/s2s/tree/master/packages/babel-plugin-s2s-reducer-root)
- [**babel-plugin-s2s-reducer-test-case**
create reducer test using switch/case](https://github.com/akameco/s2s/tree/master/packages/babel-plugin-s2s-reducer-test-case)

## Contributions

For all contributions we are always welcome. and we are working with [all-contributors](https://github.com/kentcdodds/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 code,test
```

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

```
$ yarn run add-contributors doc
```

For more infomations, refer [all-contributors](https://github.com/kentcdodds/all-contributors).

We will be welcome your contributions!

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):


akameco
akameco

💻 ⚠️ 💬 🤔 🚇
elzup
elzup

🤔 💻
erukiti
erukiti

📝 💻 ⚠️
asciian
asciian

📖
kamijin_fanta
kamijin_fanta

💻 📖
pocketberserker
pocketberserker

📖
ygkn
ygkn

💻

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

## License

MIT © [akameco](http://akameco.github.io)