diff --git a/samples/dexie-cloud-todo-app/README.md b/samples/dexie-cloud-todo-app/README.md index 38794bd92..33253f0f4 100644 --- a/samples/dexie-cloud-todo-app/README.md +++ b/samples/dexie-cloud-todo-app/README.md @@ -12,25 +12,23 @@ If you just want to see the app in action, navigate to the [pre-built published If you want to build and play with it locally, follow these steps: -1. `npm install --global pnpm@latest-9` (if pnpm not already installed) -2. `npx dexie-cloud create` -3. `pnpm install` -4. `./configure-app.sh` -5. `pnpm start` +1. `npx dexie-cloud create` +2. `npm install` +3. `./configure-app.sh` +4. `npm start` The steps above will: -1. Install pnpm (if you haven't already) -2. Create a new database in the cloud -3. Install dependencies -4. Import demo-users to your database and create a .env file that connects the ToDo app to your database. -5. Build and start the application in local dev-mode (without a service worker). +1. Create a new database in the cloud +2. Install dependencies +3. Import demo-users to your database and create a .env file that connects the ToDo app to your database. +4. Build and start the application in local dev-mode (without a service worker). # Activating Service Worker 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: -1. `pnpm run deploy` (will publish the app to your gh-pages branch of your Dexie.js fork) +1. `npm run deploy` (will publish the app to your gh-pages branch of your Dexie.js fork) 2. `npx dexie-cloud whitelist https://your-github-username.github.io` (replace `your-github-username`) 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. @@ -61,7 +59,7 @@ This command will create the file .env.local and configure it against the DB URL You can equally well set the environment variable REACT_APP_DBURL manually to the URL of your Dexie Cloud database. -### `pnpm start` +### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. @@ -69,12 +67,12 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. -### `pnpm test` +### `npm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. -### `pnpm build` +### `npm run build` Builds the app for production to the `build` folder.\ 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! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. -### `pnpm run deploy` +### `npm run deploy` Deploys the built app to gh-pages branch of this github repository under the folder /dexie-cloud-todo-app/. -### `pnpm run eject` +### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** diff --git a/samples/dexie-cloud-todo-app/configure-app.sh b/samples/dexie-cloud-todo-app/configure-app.sh index d2376789e..3b69520b4 100755 --- a/samples/dexie-cloud-todo-app/configure-app.sh +++ b/samples/dexie-cloud-todo-app/configure-app.sh @@ -19,5 +19,5 @@ echo "REACT_APP_DBURL=$DB_URL" > .env.local echo "FAST_REFRESH=false" >> .env.local echo "" echo "Application is now configured!" -echo "Use 'yarn install' if you haven't done so already." -echo "Use 'yarn start' to start the app." +echo "Use 'npm install' if you haven't done so already." +echo "Use 'npm start' to start the app." diff --git a/samples/dexie-cloud-todo-app/package.json b/samples/dexie-cloud-todo-app/package.json index 749054936..95b9b9431 100644 --- a/samples/dexie-cloud-todo-app/package.json +++ b/samples/dexie-cloud-todo-app/package.json @@ -16,9 +16,9 @@ "@types/react-dom": "^18.2.4", "@types/testing-library__jest-dom": "^5.14.6", "bootstrap": "5.3.0", - "dexie": "workspace:^", - "dexie-cloud-addon": "workspace:^", - "dexie-react-hooks": "workspace:^", + "dexie": "^4.0.11", + "dexie-cloud-addon": "^4.0.11", + "dexie-react-hooks": "^1.1.7", "postcss-flexbugs-fixes": "^5.0.2", "react": "^17.0.2", "react-bootstrap": "^2.7.4", @@ -43,7 +43,7 @@ "scripts": { "start": "react-scripts start", "build": "react-scripts build", - "predeploy": "PUBLIC_URL=. REACT_APP_BUILD_TIME=$(date +%s) yarn build", + "predeploy": "PUBLIC_URL=. REACT_APP_BUILD_TIME=$(date +%s) npm run build", "deploy": "gh-pages -d build -e dexie-cloud-todo-app", "test": "react-scripts test", "eject": "react-scripts eject"