Skip to content

Commit 6ddd2d0

Browse files
author
David Fahlander
committed
Make todo sample work standalone again
1 parent b415d92 commit 6ddd2d0

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

samples/dexie-cloud-todo-app/README.md

+14-16
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,23 @@ If you just want to see the app in action, navigate to the [pre-built published
1212

1313
If you want to build and play with it locally, follow these steps:
1414

15-
1. `npm install --global pnpm@latest-9` (if pnpm not already installed)
16-
2. `npx dexie-cloud create`
17-
3. `pnpm install`
18-
4. `./configure-app.sh`
19-
5. `pnpm start`
15+
1. `npx dexie-cloud create`
16+
2. `npm install`
17+
3. `./configure-app.sh`
18+
4. `npm start`
2019

2120
The steps above will:
2221

23-
1. Install pnpm (if you haven't already)
24-
2. Create a new database in the cloud
25-
3. Install dependencies
26-
4. Import demo-users to your database and create a .env file that connects the ToDo app to your database.
27-
5. Build and start the application in local dev-mode (without a service worker).
22+
1. Create a new database in the cloud
23+
2. Install dependencies
24+
3. Import demo-users to your database and create a .env file that connects the ToDo app to your database.
25+
4. Build and start the application in local dev-mode (without a service worker).
2826

2927
# Activating Service Worker
3028

3129
Service worker is automatically disabled in dev-mode (the default for create-react-app). To enable it, the easiest way is to deploy the app:
3230

33-
1. `pnpm run deploy` (will publish the app to your gh-pages branch of your Dexie.js fork)
31+
1. `npm run deploy` (will publish the app to your gh-pages branch of your Dexie.js fork)
3432
2. `npx dexie-cloud whitelist https://your-github-username.github.io` (replace `your-github-username`)
3533
3. Voila: Go to https://your-github-username.github.io/Dexie.js/dexie-cloud-todo-app/ from your browser. This is a full installable PWA that you can add to your start screen on a mobile phone.
3634

@@ -61,20 +59,20 @@ This command will create the file .env.local and configure it against the DB URL
6159
You can equally well set the environment variable REACT_APP_DBURL manually to the URL of your
6260
Dexie Cloud database.
6361

64-
### `pnpm start`
62+
### `npm start`
6563

6664
Runs the app in the development mode.\
6765
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
6866

6967
The page will reload if you make edits.\
7068
You will also see any lint errors in the console.
7169

72-
### `pnpm test`
70+
### `npm test`
7371

7472
Launches the test runner in the interactive watch mode.\
7573
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
7674

77-
### `pnpm build`
75+
### `npm run build`
7876

7977
Builds the app for production to the `build` folder.\
8078
It correctly bundles React in production mode and optimizes the build for the best performance.
@@ -84,11 +82,11 @@ Your app is ready to be deployed!
8482

8583
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
8684

87-
### `pnpm run deploy`
85+
### `npm run deploy`
8886

8987
Deploys the built app to gh-pages branch of this github repository under the folder /dexie-cloud-todo-app/.
9088

91-
### `pnpm run eject`
89+
### `npm run eject`
9290

9391
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
9492

samples/dexie-cloud-todo-app/configure-app.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ echo "REACT_APP_DBURL=$DB_URL" > .env.local
1919
echo "FAST_REFRESH=false" >> .env.local
2020
echo ""
2121
echo "Application is now configured!"
22-
echo "Use 'yarn install' if you haven't done so already."
23-
echo "Use 'yarn start' to start the app."
22+
echo "Use 'npm install' if you haven't done so already."
23+
echo "Use 'npm start' to start the app."

samples/dexie-cloud-todo-app/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"@types/react-dom": "^18.2.4",
1717
"@types/testing-library__jest-dom": "^5.14.6",
1818
"bootstrap": "5.3.0",
19-
"dexie": "workspace:^",
20-
"dexie-cloud-addon": "workspace:^",
21-
"dexie-react-hooks": "workspace:^",
19+
"dexie": "^4.0.11",
20+
"dexie-cloud-addon": "^4.0.11",
21+
"dexie-react-hooks": "^1.1.7",
2222
"postcss-flexbugs-fixes": "^5.0.2",
2323
"react": "^17.0.2",
2424
"react-bootstrap": "^2.7.4",
@@ -43,7 +43,7 @@
4343
"scripts": {
4444
"start": "react-scripts start",
4545
"build": "react-scripts build",
46-
"predeploy": "PUBLIC_URL=. REACT_APP_BUILD_TIME=$(date +%s) yarn build",
46+
"predeploy": "PUBLIC_URL=. REACT_APP_BUILD_TIME=$(date +%s) npm run build",
4747
"deploy": "gh-pages -d build -e dexie-cloud-todo-app",
4848
"test": "react-scripts test",
4949
"eject": "react-scripts eject"

0 commit comments

Comments
 (0)