Skip to content

Commit da6c2e2

Browse files
authored
Merge pull request #39 from gitbrent/convert-to-vite
Version 2.0.0
2 parents 34c09e4 + 73bb718 commit da6c2e2

Some content is hidden

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

51 files changed

+4708
-22251
lines changed

.eslintrc.js

-35
This file was deleted.

.gitignore

+25-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
### env vars (API Keys, etc.)
2-
.env
3-
### MacOS
4-
.DS_Store
5-
.icloud
6-
*.icloud
7-
### Node
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*
9+
810
node_modules
9-
bower_components
10-
npm-debug.log
11-
/.idea
12-
### Data
13-
src/data/*.json
14-
z.admin.local.tsx
15-
firebase-debug.log
16-
public/
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?
25+
.env
26+
.firebase

README.md

+50-31
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,50 @@
1-
# Dream Journal App
2-
3-
## Well-formatted, cloud-based Dream Journal
4-
5-
- Records daily dream journal entries into plain-text, well-formatted JSON format
6-
- Easy to search and gain insight into your dream signs
7-
- Safely stored into your Google Drive
8-
- Import wizard to convert your existing dreams into clean, searchable format
9-
10-
# Cloud-based Dream Journal
11-
12-
[Brain Cloud Dream Journal](https://brain-cloud-dream-journal.firebaseapp.com/) securely hosted on Google Firebase.
13-
14-
# Application Screens
15-
16-
![Home](https://raw.githubusercontent.com/gitbrent/dream-journal-app/master/src/img/app-screencap-home.png)
17-
18-
![Modify](https://raw.githubusercontent.com/gitbrent/dream-journal-app/master/src/img/app-screencap-modify.png)
19-
20-
![Import](https://raw.githubusercontent.com/gitbrent/dream-journal-app/master/src/img/app-screencap-import.png)
21-
22-
# Credits
23-
24-
- Based on [react-typescript](https://github.com/basarat/react-typescript)
25-
- App icon made by [Nhor Phai](https://www.flaticon.com/authors/nhor-phai) from [Flaticon](https://www.flaticon.com/) [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/")
26-
27-
# License
28-
29-
Copyright © 2019-present [Brent Ely](https://github.com/gitbrent/dream-journal-app)
30-
31-
[MIT](https://github.com/gitbrent/dream-journal-app/blob/master/LICENSE)
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@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
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13+
14+
- Configure the top-level `parserOptions` property like this:
15+
16+
```js
17+
export default tseslint.config({
18+
languageOptions: {
19+
// other options...
20+
parserOptions: {
21+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
22+
tsconfigRootDir: import.meta.dirname,
23+
},
24+
},
25+
})
26+
```
27+
28+
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29+
- Optionally add `...tseslint.configs.stylisticTypeChecked`
30+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31+
32+
```js
33+
// eslint.config.js
34+
import react from 'eslint-plugin-react'
35+
36+
export default tseslint.config({
37+
// Set the react version
38+
settings: { react: { version: '18.3' } },
39+
plugins: {
40+
// Add the react plugin
41+
react,
42+
},
43+
rules: {
44+
// other rules...
45+
// Enable its recommended rules
46+
...react.configs.recommended.rules,
47+
...react.configs['jsx-runtime'].rules,
48+
},
49+
})
50+
```

eslint.config.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true },],
23+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }]
24+
},
25+
},
26+
)

firebase.json

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
{
2-
"hosting": {
3-
"public": "public",
4-
"ignore": [
5-
"firebase.json",
6-
"**/.*",
7-
"**/node_modules/**"
8-
],
9-
"rewrites": [
10-
{
11-
"source": "**",
12-
"destination": "/index.html"
13-
}
14-
]
15-
}
2+
"hosting": {
3+
"public": "dist",
4+
"ignore": [],
5+
"rewrites": [
6+
{
7+
"source": "**",
8+
"destination": "/index.html"
9+
}
10+
]
11+
}
1612
}

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en" data-bs-theme="dark">
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+
<title>Brain Cloud - Online Dream Journal</title>
8+
</head>
9+
<body>
10+
<div id="root" class="container-fluid"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)