Skip to content

Commit df61843

Browse files
committed
Using create-reacct-app instead vite
1 parent 7cc1f40 commit df61843

42 files changed

Lines changed: 434 additions & 193 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ sites/*/node_modules
55
sites/*/dist
66
sites/*/package-lock.json
77
sites/*/yarn.lock
8+
sites/*/.env
89
packages/*/node_modules
910
packages/*/dist
1011
packages/*/package-lock.json
1112
packages/*/yarn.lock
13+
packages/*/.env
1214
package-lock.json
1315
yarn.lock

packages/google-analytics-embed-react/src/GoogleAnalyticsProvider.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const GoogleAnalyticsProvider: React.FC<GoogleAnalyticsProviderProps> = (
4040
const [authButton, setAuthButton] = React.useState<null | HTMLElement>(null);
4141
// Internal state
4242
const [gaState, setGaState] = React.useState<GoogleAnalyticsState>('INITIALIZED');
43-
4443
// Importing the google platform script and
4544
React.useEffect(() => {
4645
if (document.getElementById('gaScript') == null) {
@@ -116,7 +115,6 @@ const GoogleAnalyticsProvider: React.FC<GoogleAnalyticsProviderProps> = (
116115
}
117116
}
118117
}, [props.accessToken, props.clientId, gaState, authButton]);
119-
120118
return (
121119
<GoogleAnalyticsContext.Provider value={[gaState, setAuthButton]}>
122120
<div>{props.children}</div>

packages/google-analytics-embed-react/src/SignInButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SignInButton extends React.Component {
1313

1414
componentDidMount() {
1515
const [_, setAuthButton] = this.context as GoogleAnalyticsContextContent;
16-
setAuthButton(this.container.current as HTMLElement);
16+
setAuthButton(this.container.current as HTMLElement);
1717
}
1818

1919
render(): React.ReactNode {

sites/express-backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"dev": "node server.js"
7+
"start": "node server.js"
88
},
99
"author": "",
1010
"license": "ISC",
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
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
910

10-
node_modules
11-
dist
12-
dist-ssr
13-
*.local
11+
# production
12+
/build
1413

15-
# Editor directories and files
16-
.vscode/*
17-
!.vscode/extensions.json
18-
.idea
14+
# misc
1915
.DS_Store
20-
*.suo
21-
*.ntvs*
22-
*.njsproj
23-
*.sln
24-
*.sw?
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*

sites/react-backend-auth/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Getting Started with Create React App
2+
3+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `npm start`
10+
11+
Runs the app in the development mode.\
12+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13+
14+
The page will reload if you make edits.\
15+
You will also see any lint errors in the console.
16+
17+
### `npm test`
18+
19+
Launches the test runner in the interactive watch mode.\
20+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21+
22+
### `npm run build`
23+
24+
Builds the app for production to the `build` folder.\
25+
It correctly bundles React in production mode and optimizes the build for the best performance.
26+
27+
The build is minified and the filenames include the hashes.\
28+
Your app is ready to be deployed!
29+
30+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31+
32+
### `npm run eject`
33+
34+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35+
36+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37+
38+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39+
40+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41+
42+
## Learn More
43+
44+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45+
46+
To learn React, check out the [React documentation](https://reactjs.org/).

sites/react-backend-auth/index.html

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,39 @@
11
{
22
"name": "react-backend-auth",
3+
"version": "0.1.0",
34
"private": true,
4-
"version": "0.0.0",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "tsc && vite build",
9-
"preview": "vite preview"
10-
},
115
"dependencies": {
12-
"google-analytics-embed-react": "file:../../packages/google-analytics-embed-react/dist/",
6+
"@types/react": "^18.0.26",
7+
"@types/react-dom": "^18.0.10",
8+
"google-analytics-embed-react": "file:../../packages/google-analytics-embed-react",
139
"react": "^18.2.0",
1410
"react-dom": "^18.2.0",
1511
"axios": "1.2.2"
1612
},
1713
"devDependencies": {
18-
"@types/react": "^18.0.26",
19-
"@types/react-dom": "^18.0.9",
20-
"@vitejs/plugin-react": "^3.0.0",
21-
"typescript": "^4.9.3",
22-
"vite": "^4.0.0"
14+
"env-cmd": "^10.1.0",
15+
"react-scripts": "5.0.1",
16+
"typescript": "^4.9.4"
17+
},
18+
"scripts": {
19+
"start": "node util/set_client_id_env.js && env-cmd react-scripts start",
20+
"build": "node util/set_client_id_env.js && env-cmd react-scripts build"
21+
},
22+
"eslintConfig": {
23+
"extends": [
24+
"react-app"
25+
]
26+
},
27+
"browserslist": {
28+
"production": [
29+
">0.2%",
30+
"not dead",
31+
"not op_mini all"
32+
],
33+
"development": [
34+
"last 1 chrome version",
35+
"last 1 firefox version",
36+
"last 1 safari version"
37+
]
2338
}
2439
}
3.78 KB
Binary file not shown.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="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+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>React App</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>

0 commit comments

Comments
 (0)