Skip to content

Commit aad9ebf

Browse files
authored
Merge pull request #5 from ganesh-4212/example-react-app
fixes:#4 Added example react app.
2 parents 59ac772 + 7b3e071 commit aad9ebf

File tree

9 files changed

+12808
-8
lines changed

9 files changed

+12808
-8
lines changed

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
node_modules
44
yarn.lock
55
package-lock.json
6-
coverage
6+
coverage
7+
example

example/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

example/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2+
3+
## Install dependencies
4+
### `npm install`
5+
6+
### Issues in installing dependencies
7+
```ENOENT: no such file or directory, rename ...```
8+
9+
- Delete package-lock.json. `rm ../package-lock.json ./package-lock.json`
10+
- instal dependencies`npm install`
11+
12+
## Available Scripts
13+
14+
In the project directory, you can run:
15+
16+
### `npm start`
17+
18+
Runs the app in the development mode.<br>
19+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
20+
21+
The page will reload if you make edits.<br>
22+
You will also see any lint errors in the console.
23+

example/package-lock.json

Lines changed: 12673 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "example",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"dayjs": "^1.5.16",
7+
"react": "^16.8.6",
8+
"react-dayjs": "file:..",
9+
"react-dom": "^16.8.6",
10+
"react-scripts": "3.0.1"
11+
},
12+
"scripts": {
13+
"start": "react-scripts start",
14+
"build": "react-scripts build",
15+
"eject": "react-scripts eject"
16+
},
17+
"eslintConfig": {
18+
"extends": "react-app"
19+
},
20+
"browserslist": {
21+
"production": [
22+
">0.2%",
23+
"not dead",
24+
"not op_mini all"
25+
],
26+
"development": [
27+
"last 1 chrome version",
28+
"last 1 firefox version",
29+
"last 1 safari version"
30+
]
31+
}
32+
}

example/public/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<title>React App</title>
9+
</head>
10+
<body>
11+
<noscript>You need to enable JavaScript to run this app.</noscript>
12+
<div id="root"></div>
13+
</body>
14+
</html>

example/src/App.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react';
2+
import DayJS from 'react-dayjs';
3+
4+
function App() {
5+
const date = "2000-01-31T12:59-0500";
6+
return (
7+
<div className="App">
8+
<header className="App-header">
9+
<DayJS>{ date }</DayJS>
10+
</header>
11+
</div>
12+
);
13+
}
14+
15+
export default App;

example/src/index.js

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

package-lock.json

Lines changed: 21 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)