File tree Expand file tree Collapse file tree 11 files changed +157
-0
lines changed Expand file tree Collapse file tree 11 files changed +157
-0
lines changed Original file line number Diff line number Diff line change 1+ # See https://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 *
16+ yarn-debug.log *
17+ yarn-error.log *
18+
Original file line number Diff line number Diff line change 1+ # Create React App DevOps
2+
3+ This is a repo that proves how easily it is to implement automated builds around [ Create React App] ( https://github.com/facebookincubator/create-react-app ) . In this repo, we do the following:
4+
5+ 1 . Use Create React App to Get the UI Up
6+ 2 . Setup Your Server with Node, Express, and Babel
7+ 3 . Run the App on the Web with Bluemix
8+ 4 . Automagically Deploy from Github with Travis CI
9+ 5 . Fetch API Data While Keeping Keys Secure
10+ 6 . Create a Staging App for Experimentation
11+
12+ There are three ways to implement this in your own Create React App project:
13+
14+ - Follow along with the Medium story to make it yourself
15+ - Inspect the git diff between the initial Create React App use and the final commit
16+ - Fork this repo and follow the instructions below
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " create-react-app-devops" ,
3+ "version" : " 0.1.0" ,
4+ "private" : true ,
5+ "dependencies" : {
6+ "react" : " ^15.4.2" ,
7+ "react-dom" : " ^15.4.2"
8+ },
9+ "devDependencies" : {
10+ "react-scripts" : " 0.9.4"
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+ }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ import React , { Component } from 'react' ;
2+ import logo from './logo.svg' ;
3+ import './App.css' ;
4+
5+ class App extends Component {
6+ render ( ) {
7+ return (
8+ < div className = "App" >
9+ < div className = "App-header" >
10+ < img src = { logo } className = "App-logo" alt = "logo" />
11+ < h2 > Welcome to React</ h2 >
12+ </ div >
13+ < p className = "App-intro" >
14+ To get started, edit < code > src/App.js</ code > and save to reload.
15+ </ p >
16+ </ div >
17+ ) ;
18+ }
19+ }
20+
21+ export default App ;
Original file line number Diff line number Diff line change 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+ } ) ;
Original file line number Diff line number Diff line change 1+ body {
2+ margin : 0 ;
3+ padding : 0 ;
4+ font-family : sans-serif;
5+ }
Original file line number Diff line number Diff line change 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+ ) ;
You can’t perform that action at this time.
0 commit comments