From d8f17af4c4769c06db1e53f86695eaa8e6082805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=9Fur=20Aslan?= Date: Mon, 13 Nov 2023 13:42:10 +0100 Subject: [PATCH 1/4] TMDB API related changes --- .example.env | 1 + .github/workflows/deploy.yml | 3 +++ README.md | 4 ++-- src/api/index.js | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.example.env b/.example.env index 8244e0b..5a1b169 100644 --- a/.example.env +++ b/.example.env @@ -1 +1,2 @@ VITE_TMDB_KEY=ABC123 +VITE_TMDB_BASE_URL=https://8b4fa39d.lightningjs.workers.dev diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 26efb1b..69daa91 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,9 @@ jobs: - name: Install dependencies run: npm install + - name: Create .env file + run: cp .env.example .env + - name: Build run: npm run build diff --git a/README.md b/README.md index b9a2684..9be233b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Clone this repository and run `npm install` in the project root. Then run `npm run dev` to start the dev server and open the URL printed in your terminal to check the App. -This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (follwing the example in `.example.env`) +This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (following the example in `.example.env`). To use your own TMDB API key. you also need to change `VITE_TMDB_BASE_URL` in your `.env` file to `https://api.themoviedb.org/3/`. ## App Usage @@ -33,7 +33,7 @@ Once you've directed your browser to the URL displayed in your terminal, you hav - Rendering spritemaps: http://localhost:5173/#/sprites - Text: http://localhost:5173/#/texts - Apply theming: http://localhost:5173/#/theming -- TMDB example app ( key requiredm as described above ): http://localhost:5173/#/theming +- TMDB example app ( key required as described above ): http://localhost:5173/#/theming diff --git a/src/api/index.js b/src/api/index.js index 945573e..ebe2e4a 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -16,7 +16,8 @@ */ const API_KEY_V4 = import.meta.env.VITE_TMDB_KEY -const API_BASE = 'https://api.themoviedb.org/3' +const API_BASE = import.meta.env.VITE_TMDB_BASE_URL + let tmdbConfig let baseImageUrl const basePosterSize = 'w185' From 5aaaca0d76114b186bc33ed11716913c7c0914c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=9Fur=20Aslan?= Date: Mon, 13 Nov 2023 13:44:53 +0100 Subject: [PATCH 2/4] fixed a typo in the readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9be233b..e3f0d5a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Clone this repository and run `npm install` in the project root. Then run `npm run dev` to start the dev server and open the URL printed in your terminal to check the App. -This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (following the example in `.example.env`). To use your own TMDB API key. you also need to change `VITE_TMDB_BASE_URL` in your `.env` file to `https://api.themoviedb.org/3/`. +This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (following the example in `.example.env`). To use your own TMDB API key, you also need to change `VITE_TMDB_BASE_URL` in your `.env` file to `https://api.themoviedb.org/3/`. ## App Usage From e9e648a2f65ed9807dd64a040acfefd34c0e8ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=9Fur=20Aslan?= Date: Mon, 13 Nov 2023 13:45:46 +0100 Subject: [PATCH 3/4] another typo in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e3f0d5a..f81a670 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Clone this repository and run `npm install` in the project root. Then run `npm run dev` to start the dev server and open the URL printed in your terminal to check the App. -This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (following the example in `.example.env`). To use your own TMDB API key, you also need to change `VITE_TMDB_BASE_URL` in your `.env` file to `https://api.themoviedb.org/3/`. +This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (following the example in `.example.env`). To use your own TMDB API key, you also need to change `VITE_TMDB_BASE_URL` in your `.env` file to `https://api.themoviedb.org/3`. ## App Usage From bdaa2d4d2256c69efa84364dedefd56d08744e34 Mon Sep 17 00:00:00 2001 From: Michiel van der Geest Date: Mon, 13 Nov 2023 15:49:43 +0100 Subject: [PATCH 4/4] Bumped version and updated readme. --- README.md | 29 +---------------------------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index f81a670..6b57eee 100644 --- a/README.md +++ b/README.md @@ -8,34 +8,7 @@ Then run `npm run dev` to start the dev server and open the URL printed in your This Blits L3 Example App contains a demo of a TMBD integration. Head over to https://developers.themoviedb.org/3/getting-started/introduction to get your own TMDB API key and paste it inside a `.env` file (following the example in `.example.env`). To use your own TMDB API key, you also need to change `VITE_TMDB_BASE_URL` in your `.env` file to `https://api.themoviedb.org/3`. -## App Usage - - -Once you've directed your browser to the URL displayed in your terminal, you have the option to navigate through the various examples using the `arrow keys` or directly access a specific example. Assuming it's running at `http://localhost:5173/`: here are the direct links to each example: - -- Loading http://localhost:5173/ -- Splash screen: http://localhost:5173/#/intro -- Positioning: http://localhost:5173/#/positioning -- Transitions: http://localhost:5173/#/transitions -- Gradients: http://localhost:5173/#/gradients -- Components: http://localhost:5173/#/components -- Keyinput handling: http://localhost:5173/#/keyinput -- Coloring: http://localhost:5173/#/colors -- For loop implementation: http://localhost:5173/#/forloop -- Apply scaling: http://localhost:5173/#/scaling -- Different effects: http://localhost:5173/#/effects -- Alpha: http://localhost:5173/#/alpha -- Conditional rendering: http://localhost:5173/#/showif -- Images: http://localhost:5173/#/images -- Rotation: http://localhost:5173/#/rotation -- Events: http://localhost:5173/#/events -- Focus handling: http://localhost:5173/#/focushandling -- Rendering spritemaps: http://localhost:5173/#/sprites -- Text: http://localhost:5173/#/texts -- Apply theming: http://localhost:5173/#/theming -- TMDB example app ( key required as described above ): http://localhost:5173/#/theming - - +You can also take a look at the [hosted version](http://blits-demo.lightningjs.io) of this App. ## Bugs or issues? diff --git a/package-lock.json b/package-lock.json index 2a7c694..20aac38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lightningjs/blits-example-app", - "version": "0.3.1", + "version": "0.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@lightningjs/blits-example-app", - "version": "0.3.1", + "version": "0.3.2", "license": "Apache-2", "dependencies": { "@lightningjs/blits": "^0.4.0" diff --git a/package.json b/package.json index 82412a4..e143746 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lightningjs/blits-example-app", - "version": "0.3.1", + "version": "0.3.2", "description": "Lightning 3 Blits Example App", "main": "index.js", "type": "module",