Browse Source

fixing code style

master
Yutsuo 6 years ago
parent
commit
9a47e2483e
  1. 8
      03/docker-compose.yml
  2. 7088
      03/package-lock.json
  3. 46
      03/package.json
  4. 22
      03/public/index.html
  5. 4
      03/src/App.js
  6. 6
      03/src/index.css

8
03/docker-compose.yml

@ -1,4 +1,4 @@
version: "3.7" version: '3.7'
services: services:
react: react:
@ -11,6 +11,6 @@ services:
- ./src:/usr/src/app/src - ./src:/usr/src/app/src
- ./public:/usr/src/app/public - ./public:/usr/src/app/public
ports: ports:
- "3000:3000" - '3000:3000'
- "9229:9229" - '9229:9229'
command: ["npm", "start"] command: ['npm', 'start']

7088
03/package-lock.json generated

File diff suppressed because it is too large Load Diff

46
03/package.json

@ -1,31 +1,31 @@
{ {
"name": "03", 'name': '03',
"version": "0.1.0", 'version': '0.1.0',
"private": true, 'private': true,
"dependencies": { 'dependencies': {
"react": "^16.12.0", 'react': '^16.12.0',
"react-dom": "^16.12.0", 'react-dom': '^16.12.0',
"react-scripts": "3.2.0" 'react-scripts': '3.2.0'
}, },
"scripts": { 'scripts': {
"start": "react-scripts start", 'start': 'react-scripts start',
"build": "react-scripts build", 'build': 'react-scripts build',
"test": "react-scripts test", 'test': 'react-scripts test',
"eject": "react-scripts eject" 'eject': 'react-scripts eject'
}, },
"eslintConfig": { 'eslintConfig': {
"extends": "react-app" 'extends': 'react-app'
}, },
"browserslist": { 'browserslist': {
"production": [ 'production': [
">0.2%", '>0.2%',
"not dead", 'not dead',
"not op_mini all" 'not op_mini all'
], ],
"development": [ 'development': [
"last 1 chrome version", 'last 1 chrome version',
"last 1 firefox version", 'last 1 firefox version',
"last 1 safari version" 'last 1 safari version'
] ]
} }
} }

22
03/public/index.html

@ -1,26 +1,26 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang='en'>
<head> <head>
<meta charset="utf-8" /> <meta charset='utf-8' />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <link rel='icon' href='%PUBLIC_URL%/favicon.ico' />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name='viewport' content='width=device-width, initial-scale=1' />
<meta name="theme-color" content="#000000" /> <meta name='theme-color' content='#000000' />
<meta <meta
name="description" name='description'
content="Web site created using create-react-app" content='Web site created using create-react-app'
/> />
<link rel="apple-touch-icon" href="logo192.png" /> <link rel='apple-touch-icon' href='logo192.png' />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
--> -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel='manifest' href='%PUBLIC_URL%/manifest.json' />
<!-- <!--
Notice the use of %PUBLIC_URL% in the tags above. Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build. It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML. Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will Unlike '/favicon.ico' or 'favicon.ico', '%PUBLIC_URL%/favicon.ico' will
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
@ -28,7 +28,7 @@
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div> <div id='root'></div>
<!-- <!--
This HTML file is a template. This HTML file is a template.
If you open it directly in the browser, you will see an empty page. If you open it directly in the browser, you will see an empty page.

4
03/src/App.js

@ -6,7 +6,7 @@ import './App.css'
class App extends React.Component { class App extends React.Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = {username: "Placeholder"} this.state = {username: 'Placeholder'}
} }
handleUsernameChange(event) { handleUsernameChange(event) {
@ -19,7 +19,7 @@ class App extends React.Component {
render() { render() {
return ( return (
<div className="App"> <div className='App'>
<h1>Oy mate</h1> <h1>Oy mate</h1>
<UserInput change={this.handleUsernameChange.bind(this)} username={this.state.username} /> <UserInput change={this.handleUsernameChange.bind(this)} username={this.state.username} />
<UserOutput username={this.state.username} /> <UserOutput username={this.state.username} />

6
03/src/index.css

@ -1,13 +1,13 @@
body { body {
margin: 0; margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif; sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
code { code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace; monospace;
} }

Loading…
Cancel
Save