Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #50 from akameco/pr-getting-started
Browse files Browse the repository at this point in the history
Add getting started
  • Loading branch information
akameco committed Oct 31, 2017
2 parents 22041c3 + 545e36d commit 8713ccb
Show file tree
Hide file tree
Showing 8 changed files with 1,438 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/getting-started/.eslintignore
@@ -0,0 +1 @@
src
9 changes: 9 additions & 0 deletions examples/getting-started/.flowconfig
@@ -0,0 +1,9 @@
[ignore]

[include]

[libs]

[lints]

[options]
12 changes: 12 additions & 0 deletions examples/getting-started/package.json
@@ -0,0 +1,12 @@
{
"scripts": {
"flow": "flow",
"s2s": "s2s"
},
"devDependencies": {
"flow-bin": "^0.57.3",
"s2s": "*",
"babel-plugin-s2s-variable-initializing":
"file:../../packages/babel-plugin-s2s-variable-initializing"
}
}
22 changes: 22 additions & 0 deletions examples/getting-started/readme.md
@@ -0,0 +1,22 @@
# Getting Started

## Install

```
$ yarn
```

## Easy Start

```
$ yarn run flow
$ yarn run s2s
```

Open `src/index.js`, and Coding!

[![https://gyazo.com/c6de73c7c9044520fbbca95881c2a927](https://i.gyazo.com/c6de73c7c9044520fbbca95881c2a927.gif)](https://gyazo.com/c6de73c7c9044520fbbca95881c2a927)

## Next

See [examples/shopping-cart](https://github.com/akameco/s2s-plugins/tree/master/examples/shopping-cart)
9 changes: 9 additions & 0 deletions examples/getting-started/s2s.config.js
@@ -0,0 +1,9 @@
module.exports = {
watch: './**/*.js',
plugins: [
{
test: /.*.js$/,
plugin: ['s2s-variable-initializing'],
},
],
}
10 changes: 10 additions & 0 deletions examples/getting-started/src/index.js
@@ -0,0 +1,10 @@
/*
* @flow
* Welcome to s2s https://github.com/akameco/s2s.
* This example is very small. However Useful :)
* This plugin is that initializing variable with flow information.
*/

type User = { id: number, name: string }

// type `var user: User` and save!

0 comments on commit 8713ccb

Please sign in to comment.