Skip to content

Commit

Permalink
chore: update to use Vite!
Browse files Browse the repository at this point in the history
Finally ditching create-react-app. The migration was actually pretty straightforward. I also removed some unrelated testing libraries and updated some documentation
  • Loading branch information
tif-calin committed Oct 17, 2024
1 parent ff2a4c1 commit 8a56f4b
Show file tree
Hide file tree
Showing 10 changed files with 4,593 additions and 33,504 deletions.
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"editor.formatOnSave": true,
"editor.rulers": [100]
"editor.rulers": [100],
"files.associations": {
".env.example": "properties"
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"git.autofetch": true,
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ Originally developed by annaleigh, austin, clem, culi, daniella.

## requirements
* `npm`
* `vite`

## technology
this ancient front-end was made with create-react-app. it does not utilize typescript but is moving towards type safety with js-docs which [is a full-featured alternative to typescript](https://github.com/sveltejs/kit/discussions/4429#discussioncomment-2423814) that runs on the same engine!
this ancient front-end was originally made with create-react-app. in october 2024 it was updated to use vite.

it does not utilize typescript but is moving towards type safety with js-docs which [is a full-featured alternative to typescript](https://github.com/sveltejs/kit/discussions/4429#discussioncomment-2423814) that runs on the same engine!

## setup
0. clone down (`git clone git@github.com:openbookbook/bookbook-web.git`) and `cd ./bookbook-web`
1. copy any environmental variables with `cp .env.example .env`
2. install dependencies with `npm i`
3. start the local server with `npm start`

## useful resources
## useful development resources
**react**
- [usehooks.com](https://usehooks.com/)
- [component.gallery](https://component.gallery/)
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

- [x] Stop spamming Google Books. Rebounce and maybe get an actual API_KEY
- [ ] Update to newest react-router version
- [ ] Eject create-react-app
- [x] Eject create-react-app and migrate to Vite
- [ ] Move styling to `styled-components`
- [ ] Allow voters to add a password
- [ ] Consolidate input styling. Placeholder floats to label.
Expand Down
18 changes: 5 additions & 13 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,19 @@

<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/acl-logo.png" />
<link rel="apple-touch-icon" href="/acl-logo.png" />
<!-- <script src="https://unpkg.com/i-stand/black-lives.js" type="module"></script> -->
<!--
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/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
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.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
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`.
-->
<link rel="manifest" href="/manifest.json" />
<title>bookbook</title>
<script type="module" src="/src/index.js" defer></script>
</head>

<body>
Expand All @@ -42,4 +34,4 @@
<!-- <black-lives></black-lives> -->
</body>

</html>
</html>
Loading

0 comments on commit 8a56f4b

Please sign in to comment.