Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 83bc2ef

Browse files
docs: improve demo and docs (#10)
* docs: improve demo and docs * change script * add homepage
1 parent 5293352 commit 83bc2ef

25 files changed

+9833
-81
lines changed

‎.prettierignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ yarn.lock
44
coverage
55
dist
66
.parcel-cache
7-
demo/parse-git-diff.js
7+
demo/yarn.lock

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77

88
A parser for git diff.
99

10+
- [Installation](#installation)
11+
- [Demo](#demo)
12+
- [Usage](#usage)
13+
- [Examples](#examples)
14+
- [AST Format](#ast-format)
15+
- [License](#license)
16+
1017
## Installation
1118

1219
```bash
@@ -463,6 +470,10 @@ index 0e05564..aa39060 100644
463470

464471
</details>
465472

473+
## AST Format
474+
475+
See the [types.ts](https://github.com/yeonjuan/parse-git-diff/blob/main/src/types.ts) file for all AST formats.
476+
466477
## License
467478

468479
[MIT](./LICENSE)

‎demo/.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*

‎demo/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Demo
2+
3+
## Available Scripts
4+
5+
- `yarn start`
6+
- `yarn build`

‎demo/index.html‎

Lines changed: 0 additions & 73 deletions
This file was deleted.

‎demo/package.json‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "demo",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@testing-library/jest-dom": "^5.14.1",
7+
"@testing-library/react": "^13.0.0",
8+
"@testing-library/user-event": "^13.2.1",
9+
"@types/jest": "^27.0.1",
10+
"@types/node": "^16.7.13",
11+
"@types/react": "^18.0.0",
12+
"@types/react-dom": "^18.0.0",
13+
"codemirror": "^5.65.11",
14+
"react": "^18.2.0",
15+
"react-codemirror2": "^7.2.1",
16+
"react-dom": "^18.2.0",
17+
"react-scripts": "5.0.1",
18+
"typescript": "^4.4.2",
19+
"web-vitals": "^2.1.0",
20+
"parse-git-diff": "file:../"
21+
},
22+
"homepage": "/parse-git-diff",
23+
"scripts": {
24+
"start": "react-scripts start",
25+
"build": "react-scripts build",
26+
"test": "react-scripts test",
27+
"eject": "react-scripts eject"
28+
},
29+
"eslintConfig": {
30+
"extends": [
31+
"react-app",
32+
"react-app/jest"
33+
]
34+
},
35+
"browserslist": {
36+
"production": [
37+
">0.2%",
38+
"not dead",
39+
"not op_mini all"
40+
],
41+
"development": [
42+
"last 1 chrome version",
43+
"last 1 firefox version",
44+
"last 1 safari version"
45+
]
46+
}
47+
}

‎demo/public/index.html‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
<meta name="theme-color" content="#000000" />
7+
<meta
8+
name="description"
9+
content="Web site created using create-react-app"
10+
/>
11+
<!--
12+
manifest.json provides metadata used when your web app is installed on a
13+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14+
-->
15+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16+
<!--
17+
Notice the use of %PUBLIC_URL% in the tags above.
18+
It will be replaced with the URL of the `public` folder during the build.
19+
Only files inside the `public` folder can be referenced from the HTML.
20+
21+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22+
work correctly both with client-side routing and a non-root public URL.
23+
Learn how to configure a non-root public URL by running `npm run build`.
24+
-->
25+
<title>Demo | parse-git-diff</title>
26+
</head>
27+
<body>
28+
<noscript>You need to enable JavaScript to run this app.</noscript>
29+
<div id="root"></div>
30+
<!--
31+
This HTML file is a template.
32+
If you open it directly in the browser, you will see an empty page.
33+
34+
You can add webfonts, meta tags, or analytics to this file.
35+
The build step will place the bundled scripts into the <body> tag.
36+
37+
To begin the development, run `npm start` or `yarn start`.
38+
To create a production bundle, use `npm run build` or `yarn build`.
39+
-->
40+
</body>
41+
</html>

‎demo/public/manifest.json‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
},
10+
{
11+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

‎demo/public/robots.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

‎demo/src/App.css‎

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
.app {
2+
display: flex;
3+
flex-direction: column;
4+
flex: 1;
5+
}
6+
7+
.header {
8+
display: flex;
9+
align-items: center;
10+
background: #1a2b34;
11+
padding: 10px;
12+
font-weight: bold;
13+
}
14+
15+
.nav {
16+
margin-left: auto;
17+
margin-right: 0;
18+
}
19+
20+
.row {
21+
display: flex;
22+
flex-direction: row;
23+
justify-content: space-between;
24+
align-items: stretch;
25+
width: 100%;
26+
}
27+
28+
.row > div {
29+
width: 50%;
30+
padding: 4px;
31+
flex: 1;
32+
display: flex;
33+
flex-direction: column;
34+
}
35+
36+
@media (max-width: 800px) {
37+
.row {
38+
flex-direction: column;
39+
align-items: unset;
40+
}
41+
42+
.row > div {
43+
width: 100%;
44+
}
45+
}
46+
47+
h1 {
48+
font-size: 18px;
49+
color: white;
50+
}
51+
52+
h2 {
53+
color: #1a2b34;
54+
font-size: 16px;
55+
padding: 10px;
56+
}
57+
58+
body {
59+
background: #efefef;
60+
display: flex;
61+
flex-direction: column;
62+
height: 100vh;
63+
margin: 0;
64+
}
65+
66+
main {
67+
flex: 1;
68+
display: flex;
69+
}
70+
71+
#root {
72+
flex: 100%;
73+
display: flex;
74+
}
75+
76+
a,
77+
a:visited {
78+
text-decoration: underline;
79+
color: white;
80+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /