Skip to content
This repository was archived by the owner on Apr 11, 2019. It is now read-only.

Commit b19e289

Browse files
authored
Merge pull request #73 from RyanCCollins/feat_rc_update_deps
Feat rc update deps
2 parents 74fc978 + 21378ba commit b19e289

Some content is hidden

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

63 files changed

+7276
-7268
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
BASE_URL='http://localhost:1337/'
2+
API_URL='http://localhost:3000/'
3+
DEBUG=false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
app/build/
22
app/dist/
33
webpack.config.*.js
4+
webpack.config.js
5+
config/

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ module.exports = {
1111
"settings": {
1212
"import/resolver": {
1313
"webpack": {
14-
"config": "webpack.config.babel.js"
14+
"config": "webpack.config.js"
1515
}
1616
}
1717
},
1818
"rules": {
1919
"func-names": 0,
2020
"eol-last": 0,
21+
"react/no-unused-prop-types": 0,
2122
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
2223
"react/jsx-no-bind": [ 2, {
2324
"ignoreRefs": false,
@@ -30,6 +31,7 @@ module.exports = {
3031
}]
3132
},
3233
"plugins": [
34+
"import",
3335
"react",
3436
"graphql",
3537
"jsx-a11y"

.flowconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[ignore]
22
.*/node_modules/.*
3+
config/
34

45
[include]
56
./app/src/
@@ -15,7 +16,7 @@ suppress_comment=.*\\$FlowFixMe
1516
suppress_comment=.*\\$FlowInvalidInputTest
1617
module.name_mapper='\(react-redux\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js'
1718
module.name_mapper='\(redux\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js'
18-
module.name_mapper='.*\(.scss\|.png\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js'
19+
module.name_mapper='.*\(.scss\|.png\|.md\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js'
1920
module.name_mapper='^containers\/\(.*\)$' -> '<PROJECT_ROOT>/app/src/containers/\1'
2021
module.name_mapper='^containers$' -> '<PROJECT_ROOT>/app/src/containers'
2122
module.name_mapper='^components\/\(.*\)$' -> '<PROJECT_ROOT>/app/src/components/\1'

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ jspm_packages
4040

4141
# Optional REPL history
4242
.node_repl_history
43+
.env
44+
.vscode
45+
/server/public/**/*.js
46+
/server/public/**/*.css
47+
/server/public/**/*.map
48+
/server/public/**/*.json

app/src/apolloClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import ApolloClient, {
22
createNetworkInterface,
33
addTypeName,
44
} from 'apollo-client';
5-
import { BASE_URL } from 'config'; // eslint-disable-line
65

7-
const url = `${BASE_URL}graphql`;
6+
const baseUrl = process.env.API_URL || 'http://localhost:3000';
7+
const url = `${baseUrl}graphql`;
88

99
const client = new ApolloClient({
1010
networkInterface: createNetworkInterface({

app/src/components/About/index.js

Lines changed: 54 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,59 @@
1-
import React, { PropTypes } from 'react';
2-
import Box from 'grommet-udacity/components/Box';
3-
import Paragraph from 'grommet-udacity/components/Paragraph';
4-
import Article from 'grommet-udacity/components/Article';
5-
import Heading from 'grommet-udacity/components/Heading';
6-
import Markdown from 'grommet-udacity/components/Markdown';
7-
import Section from 'grommet-udacity/components/Section';
8-
import List from 'grommet-udacity/components/List';
9-
import ListItem from 'grommet-udacity/components/ListItem';
10-
import Anchor from 'grommet-udacity/components/Anchor';
1+
// @flow
2+
import React from 'react';
3+
import Box from 'grommet/components/Box';
4+
import Paragraph from 'grommet/components/Paragraph';
5+
import Article from 'grommet/components/Article';
6+
import Heading from 'grommet/components/Heading';
7+
import Markdown from 'grommet/components/Markdown';
8+
import Section from 'grommet/components/Section';
9+
import List from 'grommet/components/List';
10+
import ListItem from 'grommet/components/ListItem';
11+
import Anchor from 'grommet/components/Anchor';
1112
import { Divider } from 'components';
1213
import readme from './_readme.md';
1314

14-
const About = ({
15-
links,
16-
}) => (
17-
<Box align="center">
18-
<Article align="center" className="panel" pad="large">
19-
<Section align="center" justify="center">
20-
<Heading>
21-
Scalable React Boilerplate
22-
</Heading>
23-
<Divider />
24-
</Section>
25-
<Section align="center" justify="center">
26-
<Paragraph>
27-
This project was created to give the Udacity Alumni development team an
28-
incredibly optimized and easy to use React starter project. Included
29-
below is the documentation for the project.
30-
</Paragraph>
31-
<Heading tag="h4" align="center">
32-
Since making this boilerplate, it has been used in dozens of projects.
33-
</Heading>
34-
<Box align="center" pad="medium">
35-
<List>
36-
{links.map((link, i) =>
37-
<ListItem key={i}>
38-
<Anchor href={link.url}>
39-
{link.name}
40-
</Anchor>
41-
</ListItem>,
42-
)}
43-
</List>
44-
</Box>
45-
</Section>
46-
{typeof readme === 'string' &&
47-
<Markdown content={readme} />
48-
}
49-
</Article>
50-
</Box>
51-
);
52-
53-
About.propTypes = {
54-
links: PropTypes.arrayOf(
55-
PropTypes.shape({
56-
name: PropTypes.string.isRequired,
57-
url: PropTypes.string.isRequired,
58-
}),
59-
),
15+
type AboutLink = {
16+
name: string,
17+
url: string
6018
};
6119

62-
export default About;
20+
export default function About(props: {
21+
links: AboutLink[],
22+
}) {
23+
return (
24+
<Box align="center">
25+
<Article align="center" className="panel" pad="large">
26+
<Section align="center" justify="center">
27+
<Heading>
28+
Scalable React Boilerplate
29+
</Heading>
30+
<Divider />
31+
</Section>
32+
<Section align="center" justify="center">
33+
<Paragraph>
34+
This project was created to give the Udacity Alumni development team an
35+
incredibly optimized and easy to use React starter project. Included
36+
below is the documentation for the project.
37+
</Paragraph>
38+
<Heading tag="h4" align="center">
39+
Since making this boilerplate, it has been used in dozens of projects.
40+
</Heading>
41+
<Box align="center" pad="medium">
42+
<List>
43+
{props.links && props.links.map(link =>
44+
<ListItem key={link.url}>
45+
<Anchor href={link.url}>
46+
{link.name}
47+
</Anchor>
48+
</ListItem>,
49+
)}
50+
</List>
51+
</Box>
52+
</Section>
53+
{typeof readme === 'string' &&
54+
<Markdown content={readme} />
55+
}
56+
</Article>
57+
</Box>
58+
);
59+
}

app/src/components/About/tests/__snapshots__/index.test.js.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports[`<About /> should render with default props 1`] = `
2424
tag="h1">
2525
Scalable React Boilerplate
2626
</Heading>
27-
<undefined />
27+
<Divider />
2828
</Section>
2929
<Section
3030
align="center"
@@ -65,6 +65,7 @@ exports[`<About /> should render with default props 1`] = `
6565
separator="bottom">
6666
<Anchor
6767
href="https://github.com/udacityalumni/alumni-client"
68+
method="push"
6869
tag="a">
6970
Udacity Alumni Web App
7071
</Anchor>
@@ -82,6 +83,7 @@ exports[`<About /> should render with default props 1`] = `
8283
separator="bottom">
8384
<Anchor
8485
href="https://github.com/RyanCCollins/react-weekly"
86+
method="push"
8587
tag="a">
8688
React Weekly
8789
</Anchor>

app/src/components/AppFooter/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
22
import cssModules from 'react-css-modules';
3-
import Footer from 'grommet-udacity/components/Footer';
4-
import Box from 'grommet-udacity/components/Box';
5-
import Heading from 'grommet-udacity/components/Heading';
6-
import SocialShare from 'grommet-udacity/components/SocialShare';
7-
import Anchor from 'grommet-udacity/components/Anchor';
3+
import Footer from 'grommet/components/Footer';
4+
import Box from 'grommet/components/Box';
5+
import Heading from 'grommet/components/Heading';
6+
import SocialShare from 'grommet/components/SocialShare';
7+
import Anchor from 'grommet/components/Anchor';
88
import styles from './index.module.scss';
99

1010
const AppFooter = () => (

app/src/components/AppFooter/tests/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
exports[`<AppFooter /> should render with default props 1`] = `
22
<Footer
3+
align="center"
34
colorIndex="light-2"
45
direction="row"
56
pad="large"
@@ -35,6 +36,7 @@ exports[`<AppFooter /> should render with default props 1`] = `
3536
<br />
3637
<Anchor
3738
href="https://github.com/RyanCCollins/ryancollinsio"
39+
method="push"
3840
tag="a">
3941
source code.
4042
</Anchor>

0 commit comments

Comments
 (0)