Skip to content

Commit dade499

Browse files
author
jonatansalas
committed
Initial commit of example project bootstrapped with create-react-app
1 parent c9ea485 commit dade499

File tree

16 files changed

+6098
-0
lines changed

16 files changed

+6098
-0
lines changed

example/.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env
15+
npm-debug.log

example/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# redux-autoform-example
2+
3+
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).

example/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "example",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"react": "^15.5.4",
7+
"react-dom": "^15.5.4"
8+
},
9+
"devDependencies": {
10+
"custom-react-scripts": "0.0.23"
11+
},
12+
"scripts": {
13+
"start": "react-scripts start",
14+
"build": "react-scripts build",
15+
"test": "react-scripts test --env=jsdom",
16+
"eject": "react-scripts eject"
17+
}
18+
}

example/public/favicon.ico

24.3 KB
Binary file not shown.

example/public/index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
7+
<!--
8+
Notice the use of %PUBLIC_URL% in the tag above.
9+
It will be replaced with the URL of the `public` folder during the build.
10+
Only files inside the `public` folder can be referenced from the HTML.
11+
12+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
13+
work correctly both with client-side routing and a non-root public URL.
14+
Learn how to configure a non-root public URL by running `npm run build`.
15+
-->
16+
<title>React App</title>
17+
</head>
18+
<body>
19+
<div id="root"></div>
20+
<!--
21+
This HTML file is a template.
22+
If you open it directly in the browser, you will see an empty page.
23+
24+
You can add webfonts, meta tags, or analytics to this file.
25+
The build step will place the bundled scripts into the <body> tag.
26+
27+
To begin the development, run `npm start`.
28+
To create a production bundle, use `npm run build`.
29+
-->
30+
</body>
31+
</html>

example/src/App.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.App {
2+
text-align: center;
3+
}
4+
5+
.App-logo {
6+
animation: App-logo-spin infinite 20s linear;
7+
height: 80px;
8+
}
9+
10+
.App-header {
11+
background-color: #222;
12+
height: 150px;
13+
padding: 20px;
14+
color: white;
15+
}
16+
17+
.App-intro {
18+
font-size: large;
19+
}
20+
21+
@keyframes App-logo-spin {
22+
from { transform: rotate(0deg); }
23+
to { transform: rotate(360deg); }
24+
}

example/src/App.js

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import React, {Component} from 'react';
2+
import logo from './logo.svg';
3+
4+
//styles
5+
import './App.less';
6+
import './App.scss';
7+
import './App.styl';
8+
import styles from './Modules.css';
9+
10+
class App extends Component {
11+
render() {
12+
return (
13+
<div className="App">
14+
<div className="App-header">
15+
<img src={logo} className="App-logo" alt="logo"/>
16+
<h2 className="App-title"> ☢ custom-react-scripts ☢ </h2>
17+
<div className="App-subtitle"> allow custom config for create-react-app without ejecting</div>
18+
</div>
19+
20+
<div className={styles.description}>
21+
22+
<div className={styles.command}>
23+
<code>create-react-app my-app --scripts-version custom-react-scripts</code>
24+
</div>
25+
26+
<p> If you want to enable/disable certain features just modify the <b>.env</b> file in the root directory of
27+
the
28+
project.
29+
</p>
30+
31+
<b> Styling </b>
32+
<ul className="configs style-configs">
33+
<li>
34+
<code>REACT_APP_SASS=true</code>
35+
<span>- Enable SASS</span>
36+
</li>
37+
<li>
38+
<code>REACT_APP_LESS=true</code>
39+
<span>- Enable LESS</span>
40+
</li>
41+
<li>
42+
<code>REACT_APP_STYLUS=true</code>
43+
<span>- Enable Stylus</span>
44+
</li>
45+
<li>
46+
<code>REACT_APP_CSS_MODULES=true</code>
47+
<span>- Enable CSS modules </span>
48+
</li>
49+
</ul>
50+
51+
<b> ⚠️ Babel </b>
52+
53+
<div className={styles.warning}>
54+
(Please note that these features are highly experimental (especially stage-0) and still not a part of the ES
55+
specification. <br/>
56+
Use them at
57+
your own risk of breaking backwards compatibility if they don't make the final version of the spec.)
58+
</div>
59+
60+
<ul className="configs babel-configs">
61+
<li>
62+
<code>REACT_APP_BABEL_STAGE_0=true</code>
63+
<span>- Enable stage-0 preset</span>
64+
</li>
65+
<li>
66+
<code>REACT_APP_DECORATORS=true</code>
67+
<span>- Enable usage of decorators</span>
68+
</li>
69+
</ul>
70+
71+
<b> Others </b>
72+
<ul className="configs style-configs">
73+
<li>
74+
<code>PORT=3015</code>
75+
<span>- change default port (supported in CRA by default)</span>
76+
</li>
77+
<li>
78+
<code>OPEN_BROWSER=false</code>
79+
<span>- don't open browser after running webpack server</span>
80+
</li>
81+
</ul>
82+
83+
<br/>
84+
<br/>
85+
<a target="_blank" className={styles.readmeLink} href="https://github.com/kitze/create-react-app/tree/master/packages/react-scripts">
86+
Link to full README.md
87+
</a>
88+
</div>
89+
</div>
90+
)
91+
}
92+
}
93+
94+
export default App;

example/src/App.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.App {
2+
&-title {
3+
justify-content: center;
4+
}
5+
6+
&-subtitle {
7+
font-weight: 100;
8+
}
9+
10+
}

example/src/App.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.App {
2+
&-header {
3+
background-color: #222;
4+
height: 180px;
5+
padding: 20px;
6+
color: white;
7+
text-align: center;
8+
}
9+
10+
&-intro {
11+
font-size: large;
12+
}
13+
}
14+
15+
.configs {
16+
li {
17+
margin: 15px 0px;
18+
}
19+
}
20+
21+
code {
22+
border-radius: 3px;
23+
padding: 2px 10px;
24+
font-size: 17px;
25+
margin-right: 10px;
26+
background-color: rgba(222, 222, 222, 0.34);
27+
border: 1px solid #cccccc;
28+
color: #868686;
29+
}

example/src/App.styl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.App-logo
2+
animation App-logo-spin infinite 20s linear
3+
height 80px
4+
5+
@keyframes App-logo-spin
6+
from
7+
transform rotate(0deg)
8+
to
9+
transform rotate(360deg)

example/src/App.test.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+
import ReactDOM from 'react-dom';
3+
import App from './App';
4+
5+
it('renders without crashing', () => {
6+
const div = document.createElement('div');
7+
ReactDOM.render(<App />, div);
8+
});

example/src/Modules.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.appIntro {
2+
font-size: large;
3+
}
4+
5+
.code {
6+
color: red;
7+
font-weight: bold;
8+
justify-content: center;
9+
}
10+
11+
.description {
12+
padding: 20px;
13+
}
14+
15+
.warning {
16+
margin: 10px 0;
17+
font-size: 14px;
18+
line-height: 20px;
19+
font-weight: 100;
20+
color: #e68484;
21+
}
22+
23+
.command {
24+
margin: 40px 0px 50px 0;
25+
}
26+
27+
.readmeLink {
28+
font-size: 18px;
29+
}
30+
31+
.experimental {
32+
font-size: 12px;
33+
font-weight: 100;
34+
}

example/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
font-family: sans-serif;
5+
}

example/src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './App';
4+
import './index.css';
5+
6+
ReactDOM.render(
7+
<App />,
8+
document.getElementById('root')
9+
);

example/src/logo.svg

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)