Skip to content

Commit 974d1b0

Browse files
Merge pull request #146 from keitaroinc/update-to-react-19
Update to react 19
2 parents 221d604 + 5f34f97 commit 974d1b0

32 files changed

+7410
-15046
lines changed

.babelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react",
5+
"@babel/preset-typescript"
6+
]
7+
}

.eslintrc.cjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:react/recommended',
7+
'plugin:react/jsx-runtime',
8+
'plugin:react-hooks/recommended',
9+
],
10+
ignorePatterns: ['dist', '.eslintrc.cjs'],
11+
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12+
settings: { react: { version: '18.2' } },
13+
plugins: ['eslint-plugin-react-compiler','react-refresh'],
14+
rules: {
15+
'react-compiler/react-compiler': "error",
16+
'react/jsx-no-target-blank': 'off',
17+
'react-refresh/only-export-components': [
18+
'warn',
19+
{ allowConstantExport: true },
20+
],
21+
},
22+
}

.gitignore

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
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-
1+
# Logs
2+
logs
3+
*.log
214
npm-debug.log*
225
yarn-debug.log*
236
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,10 @@
11
# Blog Image Generator by Keitaro
22

3-
[![Deploy](https://github.com/keitaroinc/blog-image-generator/actions/workflows/deploy.yml/badge.svg)](https://github.com/keitaroinc/blog-image-generator/actions/workflows/deploy.yml) [![Lint](https://github.com/keitaroinc/blog-image-generator/actions/workflows/lint.yml/badge.svg)](https://github.com/keitaroinc/blog-image-generator/actions/workflows/lint.yml)
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
44

55
Blog Image Generator (BIG) is a single page application for creating blog post images developed by Keitaro. Please check the [Wiki](https://github.com/keitaroinc/blog-image-generator/wiki) for further details.
66

7-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
7+
Currently, two official plugins are available:
88

9-
## Available Scripts
10-
11-
In the project directory, you can run:
12-
13-
### `npm start`
14-
15-
Runs the app in the development mode.\
16-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
17-
18-
The page will reload if you make edits.\
19-
You will also see any lint errors in the console.
20-
21-
### `npm test`
22-
23-
Launches the test runner in the interactive watch mode.\
24-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
25-
26-
### `npm run build`
27-
28-
Builds the app for production to the `build` folder.\
29-
It correctly bundles React in production mode and optimizes the build for the best performance.
30-
31-
The build is minified and the filenames include the hashes.\
32-
Your app is ready to be deployed!
33-
34-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
35-
36-
### `npm run eject`
37-
38-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
39-
40-
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.
41-
42-
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.
43-
44-
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.
45-
46-
## Learn More
47-
48-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
49-
50-
To learn React, check out the [React documentation](https://reactjs.org/).
51-
52-
## Known Issues
53-
54-
### 1. Blank screen when opening the application
55-
56-
Usually a blank screen is caused by an error in the application, which can be specifically explored in the Developer Tools. However, a blank screen **might also be caused by changes in the templates.json configuration**. If that is the case, a quick fix could be cleaning the application data in your browser's Developer Tools.
57-
58-
- https://support.mozilla.org/en-US/kb/clear-cookies-and-site-data-firefox#w_clear-all-cookies-site-data-and-cache
59-
- https://www.howtogeek.com/664912/how-to-clear-storage-and-site-data-for-a-single-site-on-google-chrome/
60-
- https://www.laptopmag.com/articles/safari-delete-cookies
9+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
10+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

index.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<meta name="theme-color" content="#000000" />
9+
<meta
10+
name="description"
11+
content="Create image assets quickly with the Blog Image Generator by Keitaro"
12+
/>
13+
<meta name="twitter:card" content="summary_large_image" />
14+
<meta name="twitter:creator" content="@KeitaroInc" />
15+
<meta name="og:title" content="Blog Image Generator by Keitaro" />
16+
<meta
17+
name="og:description"
18+
content="Create image assets quickly with the Blog Image Generator by Keitaro"
19+
/>
20+
<meta
21+
property="og:image"
22+
content="/keitaro-blog-image-generator-post-cover.png"
23+
/>
24+
<link rel="apple-touch-icon" href="/logo192.png" />
25+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
26+
<link
27+
crossorigin="anonymous"
28+
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap"
29+
rel="stylesheet"
30+
/>
31+
<title>Blog Image Generator by Keitaro</title>
32+
</head>
33+
34+
<body>
35+
<div id="root"></div>
36+
<script type="module" src="/src/main.jsx"></script>
37+
</body>
38+
</html>

0 commit comments

Comments
 (0)