This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from akameco/pr-getting-started
Add getting started
- Loading branch information
Showing
8 changed files
with
1,438 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ignore] | ||
|
||
[include] | ||
|
||
[libs] | ||
|
||
[lints] | ||
|
||
[options] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
watch: './**/*.js', | ||
plugins: [ | ||
{ | ||
test: /.*.js$/, | ||
plugin: ['s2s-variable-initializing'], | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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! |
Oops, something went wrong.