Skip to content

Commit 55a6cba

Browse files
author
Taylor Griffith
committed
init
0 parents  commit 55a6cba

File tree

17 files changed

+7846
-0
lines changed

17 files changed

+7846
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "react-static/.babelrc"
3+
}

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: 'react-tools',
3+
}

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# dependencies
2+
/node_modules
3+
4+
# testing
5+
/coverage
6+
7+
# production
8+
/dist
9+
10+
# misc
11+
.DS_Store
12+
.env.local
13+
.env.development.local
14+
.env.test.local
15+
.env.production.local
16+
17+
npm-debug.log*
18+
yarn-debug.log*
19+
yarn-error.log*

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# React-Static - Basic Example
2+
3+
This example is the most basic version of react-static available. It includes:
4+
- Babel
5+
- CSS imports
6+
- Image imports
7+
- File imports
8+
- Automatic Routing
9+
10+
To get started, run `react-static create` and use the `basic` template.

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "react-static-example-basic",
3+
"version": "1.0.1",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"scripts": {
7+
"start": "react-static start",
8+
"stage": "react-static build --staging",
9+
"build": "react-static build",
10+
"serve": "serve dist -p 3000"
11+
},
12+
"dependencies": {
13+
"axios": "^0.16.2",
14+
"react": "^16.0.0",
15+
"react-dom": "^16.0.0",
16+
"react-hot-loader": "^4.0.0-beta.21",
17+
"react-router": "^4.2.0",
18+
"react-static": "^5.1.10"
19+
},
20+
"devDependencies": {
21+
"eslint-config-react-tools": "1.x.x",
22+
"serve": "^6.1.0"
23+
}
24+
}

public/robots.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
User-agent: *

src/App.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React from 'react'
2+
import { Router, Link } from 'react-static'
3+
import { hot } from 'react-hot-loader'
4+
//
5+
import Routes from 'react-static-routes'
6+
7+
import './app.css'
8+
9+
const App = () => (
10+
<Router>
11+
<div>
12+
<nav>
13+
<Link to="/">Home</Link>
14+
<Link to="/about">About</Link>
15+
<Link to="/blog">Blog</Link>
16+
</nav>
17+
<div className="content">
18+
<Routes />
19+
</div>
20+
</div>
21+
</Router>
22+
)
23+
24+
export default hot(module)(App)

src/app.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
body {
2+
font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial,
3+
'Lucida Grande', sans-serif;
4+
font-weight: 300;
5+
font-size: 16px;
6+
margin: 0;
7+
padding: 0;
8+
}
9+
10+
a {
11+
text-decoration: none;
12+
color: #108db8;
13+
font-weight: bold;
14+
}
15+
16+
img {
17+
max-width: 100%;
18+
}
19+
20+
nav {
21+
width: 100%;
22+
background: #108db8;
23+
}
24+
25+
nav a {
26+
color: white;
27+
padding: 1rem;
28+
display: inline-block;
29+
}
30+
31+
.content {
32+
padding: 1rem;
33+
}

src/containers/404.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react'
2+
//
3+
4+
export default () => (
5+
<div>
6+
<h1>404 - Oh no's! We couldn't find that page :(</h1>
7+
</div>
8+
)

src/containers/About.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
import React from 'react'
3+
//
4+
5+
export default () => (
6+
<div>
7+
<h1>This is what we're all about.</h1>
8+
<p>React, static sites, performance, speed. It's the stuff that makes us tick.</p>
9+
</div>
10+
)

0 commit comments

Comments
 (0)