Skip to content

Commit 66693da

Browse files
committed
ci-test passes
1 parent a1421dd commit 66693da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+12209
-21
lines changed

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"plugins": ["syntax-flow", "transform-class-properties", "transform-flow-strip-types", "transform-es2015-modules-commonjs"],
3+
"presets": [["env", {
4+
"targets": {
5+
"node": "current"
6+
}
7+
}], "flow", "stage-3", "react"]
8+
}

.eslintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": [
3+
"airbnb",
4+
"plugin:flowtype/recommended"
5+
],
6+
"parser": "babel-eslint",
7+
"plugins": [
8+
"flowtype",
9+
"compat"
10+
],
11+
"rules": {
12+
"semi": [2, "never"],
13+
"no-unexpected-multiline": 2,
14+
"compat/compat": 2,
15+
"react/prop-types": 0
16+
},
17+
"env": {
18+
"jest": true
19+
},
20+
"settings": {
21+
"flowtype": {
22+
"onlyFilesWithFlowAnnotation": false
23+
}
24+
}
25+
}

.flowconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[ignore]
2+
<PROJECT_ROOT>/src
3+
4+
[include]
5+
6+
[libs]
7+
<PROJECT_ROOT>/types/index.js
8+
9+
[lints]
10+
11+
[options]
12+
13+
[strict]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/*
2+
package-lock.json

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Vydia, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
react-loading-switch
2+
==
3+
4+
React component API for easily composing the render logic surrounding react-apollo data fetching, loading, and error handling.
5+
6+
Getting Started
7+
--
8+
9+
```shell
10+
npm i --save react-loading-switch
11+
```
12+
13+
Example
14+
--
15+
16+
```js
17+
render() {
18+
const { loading, error, media, artist } = this.props.data
19+
20+
<LoadingSwitch
21+
error={error}
22+
errorWhenMissing={() => new Error('Missing required data!')}
23+
loading={loading}
24+
renderError={(error) => <DataError error={error} />}
25+
renderLoading={() => <Loading />}
26+
require={media && artist}
27+
>
28+
{ () => (
29+
<Text>This is rendered when have the data! { media.id }</Text>
30+
) }
31+
</LoadingSwitch>
32+
}
33+
```
34+
35+
API
36+
--
37+
38+
See the [test/](test/) directory in this repo for detailed snapshot tests that cover the whole API.

flow-typed/npm/babel-cli_vx.x.x.js

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// flow-typed signature: 128c4a691e1f78786a01e9aec17e241d
2+
// flow-typed version: <<STUB>>/babel-cli_v^6.26.0/flow_v0.70.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* 'babel-cli'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module 'babel-cli' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module 'babel-cli/bin/babel-doctor' {
26+
declare module.exports: any;
27+
}
28+
29+
declare module 'babel-cli/bin/babel-external-helpers' {
30+
declare module.exports: any;
31+
}
32+
33+
declare module 'babel-cli/bin/babel-node' {
34+
declare module.exports: any;
35+
}
36+
37+
declare module 'babel-cli/bin/babel' {
38+
declare module.exports: any;
39+
}
40+
41+
declare module 'babel-cli/lib/_babel-node' {
42+
declare module.exports: any;
43+
}
44+
45+
declare module 'babel-cli/lib/babel-external-helpers' {
46+
declare module.exports: any;
47+
}
48+
49+
declare module 'babel-cli/lib/babel-node' {
50+
declare module.exports: any;
51+
}
52+
53+
declare module 'babel-cli/lib/babel/dir' {
54+
declare module.exports: any;
55+
}
56+
57+
declare module 'babel-cli/lib/babel/file' {
58+
declare module.exports: any;
59+
}
60+
61+
declare module 'babel-cli/lib/babel/index' {
62+
declare module.exports: any;
63+
}
64+
65+
declare module 'babel-cli/lib/babel/util' {
66+
declare module.exports: any;
67+
}
68+
69+
// Filename aliases
70+
declare module 'babel-cli/bin/babel-doctor.js' {
71+
declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>;
72+
}
73+
declare module 'babel-cli/bin/babel-external-helpers.js' {
74+
declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>;
75+
}
76+
declare module 'babel-cli/bin/babel-node.js' {
77+
declare module.exports: $Exports<'babel-cli/bin/babel-node'>;
78+
}
79+
declare module 'babel-cli/bin/babel.js' {
80+
declare module.exports: $Exports<'babel-cli/bin/babel'>;
81+
}
82+
declare module 'babel-cli/index' {
83+
declare module.exports: $Exports<'babel-cli'>;
84+
}
85+
declare module 'babel-cli/index.js' {
86+
declare module.exports: $Exports<'babel-cli'>;
87+
}
88+
declare module 'babel-cli/lib/_babel-node.js' {
89+
declare module.exports: $Exports<'babel-cli/lib/_babel-node'>;
90+
}
91+
declare module 'babel-cli/lib/babel-external-helpers.js' {
92+
declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>;
93+
}
94+
declare module 'babel-cli/lib/babel-node.js' {
95+
declare module.exports: $Exports<'babel-cli/lib/babel-node'>;
96+
}
97+
declare module 'babel-cli/lib/babel/dir.js' {
98+
declare module.exports: $Exports<'babel-cli/lib/babel/dir'>;
99+
}
100+
declare module 'babel-cli/lib/babel/file.js' {
101+
declare module.exports: $Exports<'babel-cli/lib/babel/file'>;
102+
}
103+
declare module 'babel-cli/lib/babel/index.js' {
104+
declare module.exports: $Exports<'babel-cli/lib/babel/index'>;
105+
}
106+
declare module 'babel-cli/lib/babel/util.js' {
107+
declare module.exports: $Exports<'babel-cli/lib/babel/util'>;
108+
}

0 commit comments

Comments
 (0)