From 56dab2df026691648abb7f6b03654aeb0d3d539d Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Thu, 24 Oct 2024 00:08:05 +0530 Subject: [PATCH 1/8] Added github action and script --- .github/workflows/readme-list-update.yml | 37 +++++++++ README.md | 3 +- scripts/bun.lockb | Bin 0 -> 3125 bytes scripts/package.json | 11 +++ scripts/tsconfig.json | 27 +++++++ scripts/update-readme.ts | 93 +++++++++++++++++++++++ techs.json | 31 ++++++++ 7 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/readme-list-update.yml create mode 100644 scripts/bun.lockb create mode 100644 scripts/package.json create mode 100644 scripts/tsconfig.json create mode 100644 scripts/update-readme.ts create mode 100644 techs.json diff --git a/.github/workflows/readme-list-update.yml b/.github/workflows/readme-list-update.yml new file mode 100644 index 0000000..8ba9538 --- /dev/null +++ b/.github/workflows/readme-list-update.yml @@ -0,0 +1,37 @@ +name: Update Examples List in README + +on: + pull_request: + branches: + - main + paths: + - "examples/**" + - "techs.json" + +jobs: + update-readme: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} + + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Update README + run: bun run scripts/update-readme.ts + + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add README.md + git commit -m "Update README.md with updated examples and technologies" || echo "No changes to commit" + + - name: Push changes + run: git push origin ${{ github.head_ref }} diff --git a/README.md b/README.md index 6ee9a57..3231129 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Learn how to easily integrate [Cloudinary](https://cloudinary.com/) into your projects with real examples. + - [.NET](#net) - [Android](#android) - [JavaScript](#javascript) @@ -225,7 +226,7 @@ Learn how to easily integrate [Cloudinary](https://cloudinary.com/) into your pr - [Countdown Timer](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/vercel-countdown-timer) - [Custom Function Remote](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/vercel-custom-function-remote) - + ## 🧐 Not seeing an example? diff --git a/scripts/bun.lockb b/scripts/bun.lockb new file mode 100644 index 0000000000000000000000000000000000000000..366f7012d11e7d4f7f0bdafbf80e841c48236fb0 GIT binary patch literal 3125 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_lNfzZLs8 ztLGh568qBXAjR8k+cfWuE2GTLuq5+7vqoN#rQAS8K)?>67&y@A1}HxprhuV1xhS)s zq?myVCUUN}e{ai-$V%22{f?SVlN7%{-0v-#_Nrp;L>}$9nSSnIB|PY)c3HvjP0=rWe0f0 zMAuFh%>BCWT3p1zQfI9WXO%046Oqh?r8AJTS=!8nu4TmU*4Po5&k=Rw{M%iJ*W}LG zVU{;p>&9BObqfo7n`MRGo6Fhz-74+mJb6(2`2xQ{WB;?8)E9O1-u?M?HPGCF0IvvWYe_i!HSP`pOLMCPQ>zLF#o_JuSc(XR2qQ zX8;xj*Z8oSo&#RA!P*M2x}S;BP|r}$*oc7v)>?qo{!EN@7J8<7h6W6MeB zdH;w7Mk1(P)M8 { + const techsData = await fs.readFile("techs.json", "utf-8"); + return JSON.parse(techsData); +} + +async function getExamples( + techs: TechMapping +): Promise> { + const examplesByTech: Record = {}; + + const folders = await fs.readdir("examples"); + for (const folder of folders) { + const configPath = path.join("examples", folder, "config.json"); + try { + const configData = await fs.readFile(configPath, "utf-8"); + const config = JSON.parse(configData); + + // If tech exists in mapping, use mapped name, otherwise use "Other" + const tech = techs[config.tech] || techs["other"]; + + if (!examplesByTech[tech]) { + examplesByTech[tech] = []; + } + + examplesByTech[tech].push({ + tech, + name: config.name, + url: repoUrl + encodeURIComponent(folder), + }); + } catch (error) { + console.error(`Error reading ${configPath}:`, error); + } + } + + return examplesByTech; +} + +async function updateReadme() { + const techs = await loadTechs(); + const examplesByTech = await getExamples(techs); + + const techList = Object.keys(techs) + .map(key => `- [${techs[key]}](#${key})`) + .join("\n"); + + let exampleSections = Object.keys(techs) + .map(key => { + const tech = techs[key]; + if (examplesByTech[tech] && examplesByTech[tech].length > 0) { + return `### ${tech}\n\n${examplesByTech[tech] + .map(example => `- [${example.name}](${example.url})`) + .join("\n")}`; + } + return null; + }) + .filter(Boolean) + .join("\n\n"); + + let readmeContent = await fs.readFile("README.md", "utf-8"); + + readmeContent = readmeContent.replace( + /[\s\S]*?/, + ` +${techList} + +## 🧰 Examples + +${exampleSections} +` + ); + + await fs.writeFile("README.md", readmeContent.trim(), "utf-8"); +} + +updateReadme() + .then(() => console.log("README updated successfully.")) + .catch(error => console.error("Error updating README:", error)); diff --git a/techs.json b/techs.json new file mode 100644 index 0000000..9397201 --- /dev/null +++ b/techs.json @@ -0,0 +1,31 @@ +{ + "net": ".NET", + "android": "Android", + "javascript": "JavaScript", + "angular": "Angular", + "astro": "Astro", + "dart": "Dart", + "flutter": "Flutter", + "go": "Go", + "html--browser": "HTML & Browser", + "ios": "iOS", + "java": "Java", + "kotlin": "Kotlin", + "laravel": "Laravel", + "netlify": "Netlify", + "nextjs": "Next.js", + "nodejs": "Node.js", + "nuxt": "Nuxt", + "php": "PHP", + "python": "Python", + "react": "React", + "remix": "Remix", + "ruby": "Ruby", + "solidjs": "SolidJS", + "svelte": "Svelte", + "sveltekit": "SvelteKit", + "streamlit": "Streamlit", + "tina": "Tina", + "vue": "Vue", + "vercel": "Vercel" +} From 7ab45aa9fa8c1c272a322b20b4678e1eb223d4d7 Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Thu, 24 Oct 2024 00:21:31 +0530 Subject: [PATCH 2/8] Update README examples --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3231129..6ace5fb 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Learn how to easily integrate [Cloudinary](https://cloudinary.com/) into your pr - [Tina](#tina) - [Vue](#vue) - [Vercel](#vercel) +- [Other](#other) **This is a community project supported by the Cloudinary Developer Experience team.** @@ -48,16 +49,16 @@ Learn how to easily integrate [Cloudinary](https://cloudinary.com/) into your pr ### Android -- [Image SDK](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/angular-imagesdk) - [ImageView](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/android-imageview) -- [Video Player](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/angular-video-player) ### JavaScript - [Image Upload with Fetch](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/javascript-image-upload-fetch) ### Angular +- [Image SDK](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/angular-imagesdk) - [Cloudinary Upload Widget with an Upload Preset (Unsigned)](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/angular-upload-widget) +- [Video Player](https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/angular-video-player) ### Astro From c692187ab9072631d61dcfa47ffcb2c41c8b5da0 Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Thu, 24 Oct 2024 00:21:38 +0530 Subject: [PATCH 3/8] Added other in techs --- techs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/techs.json b/techs.json index 9397201..c3458cc 100644 --- a/techs.json +++ b/techs.json @@ -27,5 +27,6 @@ "streamlit": "Streamlit", "tina": "Tina", "vue": "Vue", - "vercel": "Vercel" + "vercel": "Vercel", + "other": "Other" } From 629fa702ae40e5179a82ae9968871326e329553c Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Thu, 24 Oct 2024 00:21:55 +0530 Subject: [PATCH 4/8] Added config.json file for all examples --- examples/android-imageview/config.json | 4 ++++ examples/angular-imagesdk/config.json | 4 ++++ examples/angular-upload-widget/config.json | 4 ++++ examples/angular-video-player/config.json | 4 ++++ examples/astro-cloudinary/config.json | 4 ++++ examples/astro-form-upload/config.json | 4 ++++ examples/astro-image/config.json | 4 ++++ examples/astro-product-gallery/config.json | 4 ++++ examples/astro-upload-widget-preset/config.json | 4 ++++ examples/dart-image-upload/config.json | 4 ++++ examples/dart-transformation-effects/config.json | 4 ++++ examples/dotnet-image-upload/config.json | 4 ++++ examples/dotnet-video-upload/config.json | 4 ++++ examples/flutter-cldimagewidget/config.json | 4 ++++ examples/flutter-transformation-effects/config.json | 4 ++++ examples/go-credentials/config.json | 4 ++++ examples/go-image-upload/config.json | 4 ++++ examples/go-transformation-effects/config.json | 4 ++++ examples/html-client-hints/config.json | 4 ++++ examples/ios-uiimageview/config.json | 4 ++++ examples/java-image-upload/config.json | 4 ++++ examples/javascript-image-upload-fetch/config.json | 4 ++++ examples/kotlin-imageview/config.json | 4 ++++ examples/laravel-image-upload/config.json | 4 ++++ examples/netlify-custom-function-remote/config.json | 4 ++++ examples/netlify-function-webhook-endpoint/config.json | 4 ++++ examples/netlify-graph-authentication-function/config.json | 4 ++++ examples/nextjs-app-shoppable-video/config.json | 4 ++++ examples/nextjs-cldimage/config.json | 4 ++++ examples/nextjs-cldogimage/config.json | 4 ++++ examples/nextjs-clduploadbutton/config.json | 4 ++++ examples/nextjs-clduploadwidget-captions/config.json | 4 ++++ examples/nextjs-clduploadwidget-signed/config.json | 4 ++++ examples/nextjs-clduploadwidget/config.json | 4 ++++ examples/nextjs-cldvideoplayer-abr/config.json | 4 ++++ examples/nextjs-cldvideoplayer/config.json | 4 ++++ examples/nextjs-holiday-card/config.json | 4 ++++ examples/nextjs-next-image-domain/config.json | 4 ++++ examples/nextjs-next-image-loader/config.json | 4 ++++ examples/nextjs-route-handlers-upload/config.json | 4 ++++ examples/nextjs-server-actions-upload/config.json | 4 ++++ examples/nextjs-social-media-card/config.json | 4 ++++ examples/nextjs-upload-formdata/config.json | 4 ++++ examples/nextjs-upload-widget-preset/config.json | 4 ++++ examples/nextjs-upload-widget-signed/config.json | 4 ++++ examples/node-image-upload/config.json | 4 ++++ examples/node-personalized-email-images/config.json | 4 ++++ examples/node-social-media-card/config.json | 4 ++++ examples/node-transformations-effects/config.json | 4 ++++ examples/node-upload-eval/config.json | 4 ++++ examples/node-video-upload/config.json | 4 ++++ examples/nuxt-cldimage/config.json | 4 ++++ examples/nuxt-cldogimage/config.json | 4 ++++ examples/nuxt-clduploadbutton/config.json | 4 ++++ examples/nuxt-clduploadwidget/config.json | 4 ++++ examples/nuxt-cldvideoplayer/config.json | 4 ++++ examples/nuxt-nuxt-image-provider/config.json | 4 ++++ examples/nuxt-upload-widget-preset/config.json | 4 ++++ examples/php-image-upload/config.json | 4 ++++ examples/php-transformations-effects/config.json | 4 ++++ examples/python-image-overlay/config.json | 4 ++++ examples/python-image-upload/config.json | 4 ++++ examples/python-transformations-effects/config.json | 4 ++++ examples/react-advanced-image/config.json | 4 ++++ examples/react-advanced-video/config.json | 4 ++++ examples/react-background-removal/config.json | 4 ++++ examples/react-custom-fonts/config.json | 4 ++++ examples/react-dark-mode/config.json | 4 ++++ examples/react-drag-drop-upload/config.json | 4 ++++ examples/react-image-collage/config.json | 4 ++++ examples/react-product-gallery/config.json | 4 ++++ examples/react-transformations-effects/config.json | 4 ++++ examples/react-ts-media-library/config.json | 4 ++++ examples/react-upload-widget-preset-ts/config.json | 4 ++++ examples/react-upload-widget-preset/config.json | 4 ++++ examples/react-video-player/config.json | 4 ++++ examples/react-webcam/config.json | 4 ++++ examples/remix-product-gallery/config.json | 4 ++++ examples/remix-transformations-effects/config.json | 4 ++++ examples/remix-upload-widget-preset/config.json | 4 ++++ examples/remix-video-preview/config.json | 4 ++++ examples/ruby-image-overlay/config.json | 4 ++++ examples/ruby-image-upload/config.json | 4 ++++ examples/solid-product-gallery/config.json | 4 ++++ examples/solid-transformations-effects/config.json | 4 ++++ examples/solid-upload-widget-preset/config.json | 4 ++++ examples/streamlit-transformations-effects/config.json | 4 ++++ examples/svelte-product-gallery/config.json | 4 ++++ examples/svelte-video-player/config.json | 4 ++++ examples/sveltekit-cldimage/config.json | 4 ++++ examples/sveltekit-cldogimage/config.json | 4 ++++ examples/sveltekit-clduploadwidget/config.json | 4 ++++ examples/sveltekit-image-upload/config.json | 4 ++++ examples/sveltekit-transformations-effects/config.json | 4 ++++ examples/sveltekit-upload-widget-preset/config.json | 4 ++++ examples/tina-with-cloudinary/config.json | 4 ++++ examples/vercel-countdown-timer/config.json | 4 ++++ examples/vercel-custom-function-remote/config.json | 4 ++++ examples/vue-advanced-image/config.json | 4 ++++ examples/vue-product-gallery/config.json | 4 ++++ examples/vue-upload-widget-preset/config.json | 4 ++++ 101 files changed, 404 insertions(+) create mode 100644 examples/android-imageview/config.json create mode 100644 examples/angular-imagesdk/config.json create mode 100644 examples/angular-upload-widget/config.json create mode 100644 examples/angular-video-player/config.json create mode 100644 examples/astro-cloudinary/config.json create mode 100644 examples/astro-form-upload/config.json create mode 100644 examples/astro-image/config.json create mode 100644 examples/astro-product-gallery/config.json create mode 100644 examples/astro-upload-widget-preset/config.json create mode 100644 examples/dart-image-upload/config.json create mode 100644 examples/dart-transformation-effects/config.json create mode 100644 examples/dotnet-image-upload/config.json create mode 100644 examples/dotnet-video-upload/config.json create mode 100644 examples/flutter-cldimagewidget/config.json create mode 100644 examples/flutter-transformation-effects/config.json create mode 100644 examples/go-credentials/config.json create mode 100644 examples/go-image-upload/config.json create mode 100644 examples/go-transformation-effects/config.json create mode 100644 examples/html-client-hints/config.json create mode 100644 examples/ios-uiimageview/config.json create mode 100644 examples/java-image-upload/config.json create mode 100644 examples/javascript-image-upload-fetch/config.json create mode 100644 examples/kotlin-imageview/config.json create mode 100644 examples/laravel-image-upload/config.json create mode 100644 examples/netlify-custom-function-remote/config.json create mode 100644 examples/netlify-function-webhook-endpoint/config.json create mode 100644 examples/netlify-graph-authentication-function/config.json create mode 100644 examples/nextjs-app-shoppable-video/config.json create mode 100644 examples/nextjs-cldimage/config.json create mode 100644 examples/nextjs-cldogimage/config.json create mode 100644 examples/nextjs-clduploadbutton/config.json create mode 100644 examples/nextjs-clduploadwidget-captions/config.json create mode 100644 examples/nextjs-clduploadwidget-signed/config.json create mode 100644 examples/nextjs-clduploadwidget/config.json create mode 100644 examples/nextjs-cldvideoplayer-abr/config.json create mode 100644 examples/nextjs-cldvideoplayer/config.json create mode 100644 examples/nextjs-holiday-card/config.json create mode 100644 examples/nextjs-next-image-domain/config.json create mode 100644 examples/nextjs-next-image-loader/config.json create mode 100644 examples/nextjs-route-handlers-upload/config.json create mode 100644 examples/nextjs-server-actions-upload/config.json create mode 100644 examples/nextjs-social-media-card/config.json create mode 100644 examples/nextjs-upload-formdata/config.json create mode 100644 examples/nextjs-upload-widget-preset/config.json create mode 100644 examples/nextjs-upload-widget-signed/config.json create mode 100644 examples/node-image-upload/config.json create mode 100644 examples/node-personalized-email-images/config.json create mode 100644 examples/node-social-media-card/config.json create mode 100644 examples/node-transformations-effects/config.json create mode 100644 examples/node-upload-eval/config.json create mode 100644 examples/node-video-upload/config.json create mode 100644 examples/nuxt-cldimage/config.json create mode 100644 examples/nuxt-cldogimage/config.json create mode 100644 examples/nuxt-clduploadbutton/config.json create mode 100644 examples/nuxt-clduploadwidget/config.json create mode 100644 examples/nuxt-cldvideoplayer/config.json create mode 100644 examples/nuxt-nuxt-image-provider/config.json create mode 100644 examples/nuxt-upload-widget-preset/config.json create mode 100644 examples/php-image-upload/config.json create mode 100644 examples/php-transformations-effects/config.json create mode 100644 examples/python-image-overlay/config.json create mode 100644 examples/python-image-upload/config.json create mode 100644 examples/python-transformations-effects/config.json create mode 100644 examples/react-advanced-image/config.json create mode 100644 examples/react-advanced-video/config.json create mode 100644 examples/react-background-removal/config.json create mode 100644 examples/react-custom-fonts/config.json create mode 100644 examples/react-dark-mode/config.json create mode 100644 examples/react-drag-drop-upload/config.json create mode 100644 examples/react-image-collage/config.json create mode 100644 examples/react-product-gallery/config.json create mode 100644 examples/react-transformations-effects/config.json create mode 100644 examples/react-ts-media-library/config.json create mode 100644 examples/react-upload-widget-preset-ts/config.json create mode 100644 examples/react-upload-widget-preset/config.json create mode 100644 examples/react-video-player/config.json create mode 100644 examples/react-webcam/config.json create mode 100644 examples/remix-product-gallery/config.json create mode 100644 examples/remix-transformations-effects/config.json create mode 100644 examples/remix-upload-widget-preset/config.json create mode 100644 examples/remix-video-preview/config.json create mode 100644 examples/ruby-image-overlay/config.json create mode 100644 examples/ruby-image-upload/config.json create mode 100644 examples/solid-product-gallery/config.json create mode 100644 examples/solid-transformations-effects/config.json create mode 100644 examples/solid-upload-widget-preset/config.json create mode 100644 examples/streamlit-transformations-effects/config.json create mode 100644 examples/svelte-product-gallery/config.json create mode 100644 examples/svelte-video-player/config.json create mode 100644 examples/sveltekit-cldimage/config.json create mode 100644 examples/sveltekit-cldogimage/config.json create mode 100644 examples/sveltekit-clduploadwidget/config.json create mode 100644 examples/sveltekit-image-upload/config.json create mode 100644 examples/sveltekit-transformations-effects/config.json create mode 100644 examples/sveltekit-upload-widget-preset/config.json create mode 100644 examples/tina-with-cloudinary/config.json create mode 100644 examples/vercel-countdown-timer/config.json create mode 100644 examples/vercel-custom-function-remote/config.json create mode 100644 examples/vue-advanced-image/config.json create mode 100644 examples/vue-product-gallery/config.json create mode 100644 examples/vue-upload-widget-preset/config.json diff --git a/examples/android-imageview/config.json b/examples/android-imageview/config.json new file mode 100644 index 0000000..32cc58b --- /dev/null +++ b/examples/android-imageview/config.json @@ -0,0 +1,4 @@ +{ + "name": "ImageView", + "tech": "android" +} \ No newline at end of file diff --git a/examples/angular-imagesdk/config.json b/examples/angular-imagesdk/config.json new file mode 100644 index 0000000..a86d3c2 --- /dev/null +++ b/examples/angular-imagesdk/config.json @@ -0,0 +1,4 @@ +{ + "name": "Image SDK", + "tech": "angular" +} \ No newline at end of file diff --git a/examples/angular-upload-widget/config.json b/examples/angular-upload-widget/config.json new file mode 100644 index 0000000..7c050da --- /dev/null +++ b/examples/angular-upload-widget/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "angular" +} \ No newline at end of file diff --git a/examples/angular-video-player/config.json b/examples/angular-video-player/config.json new file mode 100644 index 0000000..071fe65 --- /dev/null +++ b/examples/angular-video-player/config.json @@ -0,0 +1,4 @@ +{ + "name": "Video Player", + "tech": "angular" +} \ No newline at end of file diff --git a/examples/astro-cloudinary/config.json b/examples/astro-cloudinary/config.json new file mode 100644 index 0000000..22bc169 --- /dev/null +++ b/examples/astro-cloudinary/config.json @@ -0,0 +1,4 @@ +{ + "name": "Astro Cloudinary SDK", + "tech": "astro" +} \ No newline at end of file diff --git a/examples/astro-form-upload/config.json b/examples/astro-form-upload/config.json new file mode 100644 index 0000000..787c55a --- /dev/null +++ b/examples/astro-form-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading with Forms", + "tech": "astro" +} \ No newline at end of file diff --git a/examples/astro-image/config.json b/examples/astro-image/config.json new file mode 100644 index 0000000..50716f0 --- /dev/null +++ b/examples/astro-image/config.json @@ -0,0 +1,4 @@ +{ + "name": "Using Astro Image", + "tech": "astro" +} \ No newline at end of file diff --git a/examples/astro-product-gallery/config.json b/examples/astro-product-gallery/config.json new file mode 100644 index 0000000..9f70e4c --- /dev/null +++ b/examples/astro-product-gallery/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Product Gallery", + "tech": "astro" +} \ No newline at end of file diff --git a/examples/astro-upload-widget-preset/config.json b/examples/astro-upload-widget-preset/config.json new file mode 100644 index 0000000..0b3c00a --- /dev/null +++ b/examples/astro-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "astro" +} \ No newline at end of file diff --git a/examples/dart-image-upload/config.json b/examples/dart-image-upload/config.json new file mode 100644 index 0000000..b107b2c --- /dev/null +++ b/examples/dart-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "dart" +} \ No newline at end of file diff --git a/examples/dart-transformation-effects/config.json b/examples/dart-transformation-effects/config.json new file mode 100644 index 0000000..d5d847f --- /dev/null +++ b/examples/dart-transformation-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "dart" +} \ No newline at end of file diff --git a/examples/dotnet-image-upload/config.json b/examples/dotnet-image-upload/config.json new file mode 100644 index 0000000..328e999 --- /dev/null +++ b/examples/dotnet-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "net" +} \ No newline at end of file diff --git a/examples/dotnet-video-upload/config.json b/examples/dotnet-video-upload/config.json new file mode 100644 index 0000000..a3281e7 --- /dev/null +++ b/examples/dotnet-video-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Videos", + "tech": "net" +} \ No newline at end of file diff --git a/examples/flutter-cldimagewidget/config.json b/examples/flutter-cldimagewidget/config.json new file mode 100644 index 0000000..8576d8e --- /dev/null +++ b/examples/flutter-cldimagewidget/config.json @@ -0,0 +1,4 @@ +{ + "name": "CldImageWidget", + "tech": "flutter" +} \ No newline at end of file diff --git a/examples/flutter-transformation-effects/config.json b/examples/flutter-transformation-effects/config.json new file mode 100644 index 0000000..049a058 --- /dev/null +++ b/examples/flutter-transformation-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "flutter" +} \ No newline at end of file diff --git a/examples/go-credentials/config.json b/examples/go-credentials/config.json new file mode 100644 index 0000000..f47d243 --- /dev/null +++ b/examples/go-credentials/config.json @@ -0,0 +1,4 @@ +{ + "name": "Credentials", + "tech": "go" +} \ No newline at end of file diff --git a/examples/go-image-upload/config.json b/examples/go-image-upload/config.json new file mode 100644 index 0000000..48795ff --- /dev/null +++ b/examples/go-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "go" +} \ No newline at end of file diff --git a/examples/go-transformation-effects/config.json b/examples/go-transformation-effects/config.json new file mode 100644 index 0000000..1c53ae4 --- /dev/null +++ b/examples/go-transformation-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "go" +} \ No newline at end of file diff --git a/examples/html-client-hints/config.json b/examples/html-client-hints/config.json new file mode 100644 index 0000000..3eb63ab --- /dev/null +++ b/examples/html-client-hints/config.json @@ -0,0 +1,4 @@ +{ + "name": "Client Hints", + "tech": "html&browser" +} \ No newline at end of file diff --git a/examples/ios-uiimageview/config.json b/examples/ios-uiimageview/config.json new file mode 100644 index 0000000..f0c02a6 --- /dev/null +++ b/examples/ios-uiimageview/config.json @@ -0,0 +1,4 @@ +{ + "name": "CLDUIImageView", + "tech": "ios" +} \ No newline at end of file diff --git a/examples/java-image-upload/config.json b/examples/java-image-upload/config.json new file mode 100644 index 0000000..4478998 --- /dev/null +++ b/examples/java-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "java" +} \ No newline at end of file diff --git a/examples/javascript-image-upload-fetch/config.json b/examples/javascript-image-upload-fetch/config.json new file mode 100644 index 0000000..4f7940f --- /dev/null +++ b/examples/javascript-image-upload-fetch/config.json @@ -0,0 +1,4 @@ +{ + "name": "Image Upload with Fetch", + "tech": "javascript" +} \ No newline at end of file diff --git a/examples/kotlin-imageview/config.json b/examples/kotlin-imageview/config.json new file mode 100644 index 0000000..355b9af --- /dev/null +++ b/examples/kotlin-imageview/config.json @@ -0,0 +1,4 @@ +{ + "name": "ImageView", + "tech": "kotlin" +} \ No newline at end of file diff --git a/examples/laravel-image-upload/config.json b/examples/laravel-image-upload/config.json new file mode 100644 index 0000000..f776034 --- /dev/null +++ b/examples/laravel-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "laravel" +} \ No newline at end of file diff --git a/examples/netlify-custom-function-remote/config.json b/examples/netlify-custom-function-remote/config.json new file mode 100644 index 0000000..f55a8a8 --- /dev/null +++ b/examples/netlify-custom-function-remote/config.json @@ -0,0 +1,4 @@ +{ + "name": "Netlify Function - Cloudinary Custom Remote Function", + "tech": "netlify" +} \ No newline at end of file diff --git a/examples/netlify-function-webhook-endpoint/config.json b/examples/netlify-function-webhook-endpoint/config.json new file mode 100644 index 0000000..81c0bbf --- /dev/null +++ b/examples/netlify-function-webhook-endpoint/config.json @@ -0,0 +1,4 @@ +{ + "name": "Netlify Function - Cloudinary Webhook Endpoint", + "tech": "netlify" +} \ No newline at end of file diff --git a/examples/netlify-graph-authentication-function/config.json b/examples/netlify-graph-authentication-function/config.json new file mode 100644 index 0000000..a66d589 --- /dev/null +++ b/examples/netlify-graph-authentication-function/config.json @@ -0,0 +1,4 @@ +{ + "name": "Netlify Graph Authentication - Cloudinary Auth in Netlify Function", + "tech": "netlify" +} \ No newline at end of file diff --git a/examples/nextjs-app-shoppable-video/config.json b/examples/nextjs-app-shoppable-video/config.json new file mode 100644 index 0000000..2f438d8 --- /dev/null +++ b/examples/nextjs-app-shoppable-video/config.json @@ -0,0 +1,4 @@ +{ + "name": "App Shoppable Video", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-cldimage/config.json b/examples/nextjs-cldimage/config.json new file mode 100644 index 0000000..1bb2ef4 --- /dev/null +++ b/examples/nextjs-cldimage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldImage", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-cldogimage/config.json b/examples/nextjs-cldogimage/config.json new file mode 100644 index 0000000..0bf9d60 --- /dev/null +++ b/examples/nextjs-cldogimage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldOgImage", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-clduploadbutton/config.json b/examples/nextjs-clduploadbutton/config.json new file mode 100644 index 0000000..4d0c715 --- /dev/null +++ b/examples/nextjs-clduploadbutton/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldUploadButton", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-clduploadwidget-captions/config.json b/examples/nextjs-clduploadwidget-captions/config.json new file mode 100644 index 0000000..0c539df --- /dev/null +++ b/examples/nextjs-clduploadwidget-captions/config.json @@ -0,0 +1,4 @@ +{ + "name": "Upload Widget with Captions", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-clduploadwidget-signed/config.json b/examples/nextjs-clduploadwidget-signed/config.json new file mode 100644 index 0000000..4b26f4c --- /dev/null +++ b/examples/nextjs-clduploadwidget-signed/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldUploadWidget - Signed Uploads", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-clduploadwidget/config.json b/examples/nextjs-clduploadwidget/config.json new file mode 100644 index 0000000..d26191e --- /dev/null +++ b/examples/nextjs-clduploadwidget/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldUploadWidget", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-cldvideoplayer-abr/config.json b/examples/nextjs-cldvideoplayer-abr/config.json new file mode 100644 index 0000000..26672d8 --- /dev/null +++ b/examples/nextjs-cldvideoplayer-abr/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldVideoPlayer - Streaming & ABR", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-cldvideoplayer/config.json b/examples/nextjs-cldvideoplayer/config.json new file mode 100644 index 0000000..c89c0ae --- /dev/null +++ b/examples/nextjs-cldvideoplayer/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Cloudinary - CldVideoPlayer", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-holiday-card/config.json b/examples/nextjs-holiday-card/config.json new file mode 100644 index 0000000..d7621e2 --- /dev/null +++ b/examples/nextjs-holiday-card/config.json @@ -0,0 +1,4 @@ +{ + "name": "Holiday Card", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-next-image-domain/config.json b/examples/nextjs-next-image-domain/config.json new file mode 100644 index 0000000..59bcbdb --- /dev/null +++ b/examples/nextjs-next-image-domain/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Image - Cloudinary URLs", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-next-image-loader/config.json b/examples/nextjs-next-image-loader/config.json new file mode 100644 index 0000000..6db4249 --- /dev/null +++ b/examples/nextjs-next-image-loader/config.json @@ -0,0 +1,4 @@ +{ + "name": "Next Image - Cloudinary Loader", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-route-handlers-upload/config.json b/examples/nextjs-route-handlers-upload/config.json new file mode 100644 index 0000000..2fa3201 --- /dev/null +++ b/examples/nextjs-route-handlers-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Upload Files with Route Handlers", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-server-actions-upload/config.json b/examples/nextjs-server-actions-upload/config.json new file mode 100644 index 0000000..22c7c83 --- /dev/null +++ b/examples/nextjs-server-actions-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Upload Files with Server Actions", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-social-media-card/config.json b/examples/nextjs-social-media-card/config.json new file mode 100644 index 0000000..49b0186 --- /dev/null +++ b/examples/nextjs-social-media-card/config.json @@ -0,0 +1,4 @@ +{ + "name": "Social Media Cards", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-upload-formdata/config.json b/examples/nextjs-upload-formdata/config.json new file mode 100644 index 0000000..d340c92 --- /dev/null +++ b/examples/nextjs-upload-formdata/config.json @@ -0,0 +1,4 @@ +{ + "name": "Upload Files with FormData in API Routes", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-upload-widget-preset/config.json b/examples/nextjs-upload-widget-preset/config.json new file mode 100644 index 0000000..c5ef5ef --- /dev/null +++ b/examples/nextjs-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/nextjs-upload-widget-signed/config.json b/examples/nextjs-upload-widget-signed/config.json new file mode 100644 index 0000000..9b3030c --- /dev/null +++ b/examples/nextjs-upload-widget-signed/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with Signed Uploads", + "tech": "nextjs" +} \ No newline at end of file diff --git a/examples/node-image-upload/config.json b/examples/node-image-upload/config.json new file mode 100644 index 0000000..18bd89b --- /dev/null +++ b/examples/node-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "nodejs" +} \ No newline at end of file diff --git a/examples/node-personalized-email-images/config.json b/examples/node-personalized-email-images/config.json new file mode 100644 index 0000000..1587c69 --- /dev/null +++ b/examples/node-personalized-email-images/config.json @@ -0,0 +1,4 @@ +{ + "name": "Personalized Email Images", + "tech": "nodejs" +} \ No newline at end of file diff --git a/examples/node-social-media-card/config.json b/examples/node-social-media-card/config.json new file mode 100644 index 0000000..2d81498 --- /dev/null +++ b/examples/node-social-media-card/config.json @@ -0,0 +1,4 @@ +{ + "name": "Social Media Card", + "tech": "nodejs" +} \ No newline at end of file diff --git a/examples/node-transformations-effects/config.json b/examples/node-transformations-effects/config.json new file mode 100644 index 0000000..e48b374 --- /dev/null +++ b/examples/node-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "nodejs" +} \ No newline at end of file diff --git a/examples/node-upload-eval/config.json b/examples/node-upload-eval/config.json new file mode 100644 index 0000000..7e49750 --- /dev/null +++ b/examples/node-upload-eval/config.json @@ -0,0 +1,4 @@ +{ + "name": "Eval on Upload", + "tech": "nodejs" +} \ No newline at end of file diff --git a/examples/node-video-upload/config.json b/examples/node-video-upload/config.json new file mode 100644 index 0000000..c9474d8 --- /dev/null +++ b/examples/node-video-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Videos", + "tech": "nodejs" +} \ No newline at end of file diff --git a/examples/nuxt-cldimage/config.json b/examples/nuxt-cldimage/config.json new file mode 100644 index 0000000..121fb3a --- /dev/null +++ b/examples/nuxt-cldimage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Nuxt Cloudinary - CldImage", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/nuxt-cldogimage/config.json b/examples/nuxt-cldogimage/config.json new file mode 100644 index 0000000..49bdb86 --- /dev/null +++ b/examples/nuxt-cldogimage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Nuxt Cloudinary - CldOgImage", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/nuxt-clduploadbutton/config.json b/examples/nuxt-clduploadbutton/config.json new file mode 100644 index 0000000..f70f062 --- /dev/null +++ b/examples/nuxt-clduploadbutton/config.json @@ -0,0 +1,4 @@ +{ + "name": "Nuxt Cloudinary - CldUploadButton", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/nuxt-clduploadwidget/config.json b/examples/nuxt-clduploadwidget/config.json new file mode 100644 index 0000000..0078e2a --- /dev/null +++ b/examples/nuxt-clduploadwidget/config.json @@ -0,0 +1,4 @@ +{ + "name": "Nuxt Cloudinary - CldUploadWidget", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/nuxt-cldvideoplayer/config.json b/examples/nuxt-cldvideoplayer/config.json new file mode 100644 index 0000000..21d9f62 --- /dev/null +++ b/examples/nuxt-cldvideoplayer/config.json @@ -0,0 +1,4 @@ +{ + "name": "Nuxt Cloudinary - CldVideoPlayer", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/nuxt-nuxt-image-provider/config.json b/examples/nuxt-nuxt-image-provider/config.json new file mode 100644 index 0000000..401fcb2 --- /dev/null +++ b/examples/nuxt-nuxt-image-provider/config.json @@ -0,0 +1,4 @@ +{ + "name": "Nuxt Image - Cloudinary Image Provider", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/nuxt-upload-widget-preset/config.json b/examples/nuxt-upload-widget-preset/config.json new file mode 100644 index 0000000..ea81fd1 --- /dev/null +++ b/examples/nuxt-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "nuxt" +} \ No newline at end of file diff --git a/examples/php-image-upload/config.json b/examples/php-image-upload/config.json new file mode 100644 index 0000000..e323253 --- /dev/null +++ b/examples/php-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "php" +} \ No newline at end of file diff --git a/examples/php-transformations-effects/config.json b/examples/php-transformations-effects/config.json new file mode 100644 index 0000000..9e5355c --- /dev/null +++ b/examples/php-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "php" +} \ No newline at end of file diff --git a/examples/python-image-overlay/config.json b/examples/python-image-overlay/config.json new file mode 100644 index 0000000..74398e1 --- /dev/null +++ b/examples/python-image-overlay/config.json @@ -0,0 +1,4 @@ +{ + "name": "Image Overlays", + "tech": "python" +} \ No newline at end of file diff --git a/examples/python-image-upload/config.json b/examples/python-image-upload/config.json new file mode 100644 index 0000000..081ec47 --- /dev/null +++ b/examples/python-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "python" +} \ No newline at end of file diff --git a/examples/python-transformations-effects/config.json b/examples/python-transformations-effects/config.json new file mode 100644 index 0000000..3691ee2 --- /dev/null +++ b/examples/python-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "python" +} \ No newline at end of file diff --git a/examples/react-advanced-image/config.json b/examples/react-advanced-image/config.json new file mode 100644 index 0000000..1f3ecee --- /dev/null +++ b/examples/react-advanced-image/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary AdvancedImage", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-advanced-video/config.json b/examples/react-advanced-video/config.json new file mode 100644 index 0000000..30afbc5 --- /dev/null +++ b/examples/react-advanced-video/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary AdvancedVideo", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-background-removal/config.json b/examples/react-background-removal/config.json new file mode 100644 index 0000000..5dbf14c --- /dev/null +++ b/examples/react-background-removal/config.json @@ -0,0 +1,4 @@ +{ + "name": "Removing Backgrounds", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-custom-fonts/config.json b/examples/react-custom-fonts/config.json new file mode 100644 index 0000000..a77387a --- /dev/null +++ b/examples/react-custom-fonts/config.json @@ -0,0 +1,4 @@ +{ + "name": "Custom Fonts", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-dark-mode/config.json b/examples/react-dark-mode/config.json new file mode 100644 index 0000000..203591c --- /dev/null +++ b/examples/react-dark-mode/config.json @@ -0,0 +1,4 @@ +{ + "name": "Dark Mode & Light Mode Images", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-drag-drop-upload/config.json b/examples/react-drag-drop-upload/config.json new file mode 100644 index 0000000..c8e46d5 --- /dev/null +++ b/examples/react-drag-drop-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Drag & Drop Upload", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-image-collage/config.json b/examples/react-image-collage/config.json new file mode 100644 index 0000000..378ddd0 --- /dev/null +++ b/examples/react-image-collage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Image Collage", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-product-gallery/config.json b/examples/react-product-gallery/config.json new file mode 100644 index 0000000..8dfbd38 --- /dev/null +++ b/examples/react-product-gallery/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Product Gallery", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-transformations-effects/config.json b/examples/react-transformations-effects/config.json new file mode 100644 index 0000000..4f30092 --- /dev/null +++ b/examples/react-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-ts-media-library/config.json b/examples/react-ts-media-library/config.json new file mode 100644 index 0000000..f8e397b --- /dev/null +++ b/examples/react-ts-media-library/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Media Library", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-upload-widget-preset-ts/config.json b/examples/react-upload-widget-preset-ts/config.json new file mode 100644 index 0000000..f791113 --- /dev/null +++ b/examples/react-upload-widget-preset-ts/config.json @@ -0,0 +1,4 @@ +{ + "name": "Upload Widget with Upload Preset (TypeScript)", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-upload-widget-preset/config.json b/examples/react-upload-widget-preset/config.json new file mode 100644 index 0000000..69ddef1 --- /dev/null +++ b/examples/react-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-video-player/config.json b/examples/react-video-player/config.json new file mode 100644 index 0000000..7126e6c --- /dev/null +++ b/examples/react-video-player/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Video Player", + "tech": "react" +} \ No newline at end of file diff --git a/examples/react-webcam/config.json b/examples/react-webcam/config.json new file mode 100644 index 0000000..d0c4e2f --- /dev/null +++ b/examples/react-webcam/config.json @@ -0,0 +1,4 @@ +{ + "name": "Webcam", + "tech": "react" +} \ No newline at end of file diff --git a/examples/remix-product-gallery/config.json b/examples/remix-product-gallery/config.json new file mode 100644 index 0000000..75c5ded --- /dev/null +++ b/examples/remix-product-gallery/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Product Gallery", + "tech": "remix" +} \ No newline at end of file diff --git a/examples/remix-transformations-effects/config.json b/examples/remix-transformations-effects/config.json new file mode 100644 index 0000000..ed18f4c --- /dev/null +++ b/examples/remix-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "remix" +} \ No newline at end of file diff --git a/examples/remix-upload-widget-preset/config.json b/examples/remix-upload-widget-preset/config.json new file mode 100644 index 0000000..73748b5 --- /dev/null +++ b/examples/remix-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "remix" +} \ No newline at end of file diff --git a/examples/remix-video-preview/config.json b/examples/remix-video-preview/config.json new file mode 100644 index 0000000..7b876db --- /dev/null +++ b/examples/remix-video-preview/config.json @@ -0,0 +1,4 @@ +{ + "name": "Video Preview", + "tech": "remix" +} \ No newline at end of file diff --git a/examples/ruby-image-overlay/config.json b/examples/ruby-image-overlay/config.json new file mode 100644 index 0000000..34f428a --- /dev/null +++ b/examples/ruby-image-overlay/config.json @@ -0,0 +1,4 @@ +{ + "name": "Image Overlays", + "tech": "ruby" +} \ No newline at end of file diff --git a/examples/ruby-image-upload/config.json b/examples/ruby-image-upload/config.json new file mode 100644 index 0000000..1678299 --- /dev/null +++ b/examples/ruby-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "ruby" +} \ No newline at end of file diff --git a/examples/solid-product-gallery/config.json b/examples/solid-product-gallery/config.json new file mode 100644 index 0000000..d11ddc3 --- /dev/null +++ b/examples/solid-product-gallery/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Product Gallery", + "tech": "solidjs" +} \ No newline at end of file diff --git a/examples/solid-transformations-effects/config.json b/examples/solid-transformations-effects/config.json new file mode 100644 index 0000000..c8540fa --- /dev/null +++ b/examples/solid-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "solidjs" +} \ No newline at end of file diff --git a/examples/solid-upload-widget-preset/config.json b/examples/solid-upload-widget-preset/config.json new file mode 100644 index 0000000..94ced55 --- /dev/null +++ b/examples/solid-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "solidjs" +} \ No newline at end of file diff --git a/examples/streamlit-transformations-effects/config.json b/examples/streamlit-transformations-effects/config.json new file mode 100644 index 0000000..8e2422a --- /dev/null +++ b/examples/streamlit-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "streamlit" +} \ No newline at end of file diff --git a/examples/svelte-product-gallery/config.json b/examples/svelte-product-gallery/config.json new file mode 100644 index 0000000..c935cee --- /dev/null +++ b/examples/svelte-product-gallery/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Product Gallery", + "tech": "svelte" +} \ No newline at end of file diff --git a/examples/svelte-video-player/config.json b/examples/svelte-video-player/config.json new file mode 100644 index 0000000..496c7ef --- /dev/null +++ b/examples/svelte-video-player/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Video Player", + "tech": "svelte" +} \ No newline at end of file diff --git a/examples/sveltekit-cldimage/config.json b/examples/sveltekit-cldimage/config.json new file mode 100644 index 0000000..adb7a17 --- /dev/null +++ b/examples/sveltekit-cldimage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Svelte Cloudinary - CldImage", + "tech": "sveltekit" +} \ No newline at end of file diff --git a/examples/sveltekit-cldogimage/config.json b/examples/sveltekit-cldogimage/config.json new file mode 100644 index 0000000..2dd795a --- /dev/null +++ b/examples/sveltekit-cldogimage/config.json @@ -0,0 +1,4 @@ +{ + "name": "Svelte Cloudinary - CldOgImage", + "tech": "sveltekit" +} \ No newline at end of file diff --git a/examples/sveltekit-clduploadwidget/config.json b/examples/sveltekit-clduploadwidget/config.json new file mode 100644 index 0000000..0c35a94 --- /dev/null +++ b/examples/sveltekit-clduploadwidget/config.json @@ -0,0 +1,4 @@ +{ + "name": "Svelte Cloudinary - CldUploadWidget", + "tech": "sveltekit" +} \ No newline at end of file diff --git a/examples/sveltekit-image-upload/config.json b/examples/sveltekit-image-upload/config.json new file mode 100644 index 0000000..fce1d17 --- /dev/null +++ b/examples/sveltekit-image-upload/config.json @@ -0,0 +1,4 @@ +{ + "name": "Uploading Images", + "tech": "sveltekit" +} \ No newline at end of file diff --git a/examples/sveltekit-transformations-effects/config.json b/examples/sveltekit-transformations-effects/config.json new file mode 100644 index 0000000..11546ea --- /dev/null +++ b/examples/sveltekit-transformations-effects/config.json @@ -0,0 +1,4 @@ +{ + "name": "Transformations & Effects", + "tech": "sveltekit" +} \ No newline at end of file diff --git a/examples/sveltekit-upload-widget-preset/config.json b/examples/sveltekit-upload-widget-preset/config.json new file mode 100644 index 0000000..3064da8 --- /dev/null +++ b/examples/sveltekit-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "sveltekit" +} \ No newline at end of file diff --git a/examples/tina-with-cloudinary/config.json b/examples/tina-with-cloudinary/config.json new file mode 100644 index 0000000..3e3f42b --- /dev/null +++ b/examples/tina-with-cloudinary/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Media Manager Integration", + "tech": "tina" +} \ No newline at end of file diff --git a/examples/vercel-countdown-timer/config.json b/examples/vercel-countdown-timer/config.json new file mode 100644 index 0000000..1671b85 --- /dev/null +++ b/examples/vercel-countdown-timer/config.json @@ -0,0 +1,4 @@ +{ + "name": "Countdown Timer", + "tech": "vercel" +} \ No newline at end of file diff --git a/examples/vercel-custom-function-remote/config.json b/examples/vercel-custom-function-remote/config.json new file mode 100644 index 0000000..ebb18d6 --- /dev/null +++ b/examples/vercel-custom-function-remote/config.json @@ -0,0 +1,4 @@ +{ + "name": "Custom Function Remote", + "tech": "vercel" +} \ No newline at end of file diff --git a/examples/vue-advanced-image/config.json b/examples/vue-advanced-image/config.json new file mode 100644 index 0000000..954cafc --- /dev/null +++ b/examples/vue-advanced-image/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary AdvancedImage", + "tech": "vue" +} \ No newline at end of file diff --git a/examples/vue-product-gallery/config.json b/examples/vue-product-gallery/config.json new file mode 100644 index 0000000..bbd85f7 --- /dev/null +++ b/examples/vue-product-gallery/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Product Gallery", + "tech": "vue" +} \ No newline at end of file diff --git a/examples/vue-upload-widget-preset/config.json b/examples/vue-upload-widget-preset/config.json new file mode 100644 index 0000000..4059ce4 --- /dev/null +++ b/examples/vue-upload-widget-preset/config.json @@ -0,0 +1,4 @@ +{ + "name": "Cloudinary Upload Widget with an Upload Preset (Unsigned)", + "tech": "vue" +} \ No newline at end of file From 73b1cd2f3db42ea255357e47c903e6aecfef516a Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Sat, 26 Oct 2024 13:15:29 +0530 Subject: [PATCH 5/8] Update action, throw an error and comment on the PR if the tech isn't in the list, remove "Other" tech --- .github/workflows/readme-list-update.yml | 25 ++++++++++++++++++++++-- README.md | 1 - scripts/update-readme.ts | 23 +++++++++++++++------- techs.json | 3 +-- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/.github/workflows/readme-list-update.yml b/.github/workflows/readme-list-update.yml index 8ba9538..a1d3c17 100644 --- a/.github/workflows/readme-list-update.yml +++ b/.github/workflows/readme-list-update.yml @@ -24,14 +24,35 @@ jobs: bun-version: latest - name: Update README - run: bun run scripts/update-readme.ts + id: update-readme + run: | + bun run scripts/update-readme.ts || (echo "README update failed" > error.log && exit 1) - name: Commit changes + if: success() run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add README.md - git commit -m "Update README.md with updated examples and technologies" || echo "No changes to commit" + git commit -m "Update README.md with new examples and technologies" || echo "No changes to commit" - name: Push changes + if: success() run: git push origin ${{ github.head_ref }} + + - name: Comment on Pull Request if README Update Fails + if: failure() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tech_error=$(cat error.log) + response=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITHUB_TOKEN" \ + -X POST \ + -d '{"body": "🚨 **README Update Failed**\n\nA tech stack was found without an entry in `techs.json`. Please add the missing tech in `techs.json` in the following format:\n\n```json\n\"tech-id\": \"Tech Display Name\"\n```\n\nFor example:\n\n```json\n\"nextjs\": \"Next.js\"\n```\n\nError Details:\n\n```\n'"$tech_error"'\n```"}' \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments") + + if [ "$response" -eq 201 ]; then + echo "Comment posted successfully." + else + echo "Failed to post comment. HTTP status: $response" + fi diff --git a/README.md b/README.md index 6ace5fb..d757df5 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Learn how to easily integrate [Cloudinary](https://cloudinary.com/) into your pr - [Tina](#tina) - [Vue](#vue) - [Vercel](#vercel) -- [Other](#other) **This is a community project supported by the Cloudinary Developer Experience team.** diff --git a/scripts/update-readme.ts b/scripts/update-readme.ts index 9293035..1d506fd 100644 --- a/scripts/update-readme.ts +++ b/scripts/update-readme.ts @@ -31,8 +31,13 @@ async function getExamples( const configData = await fs.readFile(configPath, "utf-8"); const config = JSON.parse(configData); - // If tech exists in mapping, use mapped name, otherwise use "Other" - const tech = techs[config.tech] || techs["other"]; + if (!techs[config.tech]) { + const errorMsg = `Tech '${config.tech}' not found in techs.json. Please add it in the format: "yourtech": "YourTech"`; + await fs.writeFile("error.log", errorMsg, "utf-8"); + throw new Error(errorMsg); + } + + const tech = techs[config.tech]; if (!examplesByTech[tech]) { examplesByTech[tech] = []; @@ -45,6 +50,7 @@ async function getExamples( }); } catch (error) { console.error(`Error reading ${configPath}:`, error); + throw error; } } @@ -59,7 +65,7 @@ async function updateReadme() { .map(key => `- [${techs[key]}](#${key})`) .join("\n"); - let exampleSections = Object.keys(techs) + const exampleSections = Object.keys(techs) .map(key => { const tech = techs[key]; if (examplesByTech[tech] && examplesByTech[tech].length > 0) { @@ -75,14 +81,14 @@ async function updateReadme() { let readmeContent = await fs.readFile("README.md", "utf-8"); readmeContent = readmeContent.replace( - /[\s\S]*?/, - ` + /[\s\S]*?/, + ` ${techList} ## 🧰 Examples ${exampleSections} -` +` ); await fs.writeFile("README.md", readmeContent.trim(), "utf-8"); @@ -90,4 +96,7 @@ ${exampleSections} updateReadme() .then(() => console.log("README updated successfully.")) - .catch(error => console.error("Error updating README:", error)); + .catch(error => { + console.error("Error updating README:", error); + process.exit(1); + }); diff --git a/techs.json b/techs.json index c3458cc..9397201 100644 --- a/techs.json +++ b/techs.json @@ -27,6 +27,5 @@ "streamlit": "Streamlit", "tina": "Tina", "vue": "Vue", - "vercel": "Vercel", - "other": "Other" + "vercel": "Vercel" } From 1ff17cab367b80bc6726f84daff8055e87293a9f Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Sat, 26 Oct 2024 16:54:51 +0530 Subject: [PATCH 6/8] Fix crucial bug and use Bun for reading and writing to files --- scripts/update-readme.ts | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/scripts/update-readme.ts b/scripts/update-readme.ts index 1d506fd..76b44a1 100644 --- a/scripts/update-readme.ts +++ b/scripts/update-readme.ts @@ -1,13 +1,12 @@ -import { promises as fs } from "fs"; +import fs from "node:fs/promises"; import path from "path"; -interface TechMapping { - [key: string]: string; -} - +type TechMapping = Record; +type ExampleMapping = Record; +type ExampleConfig = Omit; interface Example { - tech: string; name: string; + tech: string; url: string; } @@ -15,25 +14,22 @@ const repoUrl = "https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/"; async function loadTechs(): Promise { - const techsData = await fs.readFile("techs.json", "utf-8"); - return JSON.parse(techsData); + const techsData: TechMapping = await Bun.file("techs.json").json(); + return techsData; } -async function getExamples( - techs: TechMapping -): Promise> { - const examplesByTech: Record = {}; +async function getExamples(techs: TechMapping): Promise { + const examplesByTech: ExampleMapping = {}; const folders = await fs.readdir("examples"); for (const folder of folders) { const configPath = path.join("examples", folder, "config.json"); try { - const configData = await fs.readFile(configPath, "utf-8"); - const config = JSON.parse(configData); + const config: ExampleConfig = await Bun.file(configPath).json(); if (!techs[config.tech]) { - const errorMsg = `Tech '${config.tech}' not found in techs.json. Please add it in the format: "yourtech": "YourTech"`; - await fs.writeFile("error.log", errorMsg, "utf-8"); + const errorMsg = `Tech '${config.tech}' not found in techs.json. Please add it in the JSON format: "yourtech": "YourTech"`; + await Bun.write("error.log", errorMsg); throw new Error(errorMsg); } @@ -81,17 +77,17 @@ async function updateReadme() { let readmeContent = await fs.readFile("README.md", "utf-8"); readmeContent = readmeContent.replace( - /[\s\S]*?/, - ` + /[\s\S]*?/, + ` ${techList} ## 🧰 Examples ${exampleSections} -` +` ); - await fs.writeFile("README.md", readmeContent.trim(), "utf-8"); + await Bun.write("README.md", readmeContent.trim()); } updateReadme() From 624c25d01b0adc8242e15775a58b689c6c006043 Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Sat, 26 Oct 2024 17:14:04 +0530 Subject: [PATCH 7/8] Use `node:` in imports for consistency --- scripts/update-readme.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-readme.ts b/scripts/update-readme.ts index 76b44a1..cdd187d 100644 --- a/scripts/update-readme.ts +++ b/scripts/update-readme.ts @@ -1,5 +1,5 @@ import fs from "node:fs/promises"; -import path from "path"; +import path from "node:path"; type TechMapping = Record; type ExampleMapping = Record; From 398a9ceb4aa2d7e3fd32bc8dde30accc866abb96 Mon Sep 17 00:00:00 2001 From: "Usman S." Date: Sat, 26 Oct 2024 18:12:01 +0530 Subject: [PATCH 8/8] Include missing techs that need to be added in the comment --- .github/workflows/readme-list-update.yml | 8 ++++++-- scripts/update-readme.ts | 17 ++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/readme-list-update.yml b/.github/workflows/readme-list-update.yml index a1d3c17..215ec9c 100644 --- a/.github/workflows/readme-list-update.yml +++ b/.github/workflows/readme-list-update.yml @@ -26,7 +26,11 @@ jobs: - name: Update README id: update-readme run: | - bun run scripts/update-readme.ts || (echo "README update failed" > error.log && exit 1) + if ! bun run scripts/update-readme.ts; then + echo "README update failed. See details below:" + cat error.log + exit 1 + fi - name: Commit changes if: success() @@ -48,7 +52,7 @@ jobs: tech_error=$(cat error.log) response=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITHUB_TOKEN" \ -X POST \ - -d '{"body": "🚨 **README Update Failed**\n\nA tech stack was found without an entry in `techs.json`. Please add the missing tech in `techs.json` in the following format:\n\n```json\n\"tech-id\": \"Tech Display Name\"\n```\n\nFor example:\n\n```json\n\"nextjs\": \"Next.js\"\n```\n\nError Details:\n\n```\n'"$tech_error"'\n```"}' \ + -d '{"body": "🚨 **README Update Failed**\n\nThe following tech stack(s) were found in examples but do not have entries in `techs.json`. Please add each missing tech in `techs.json` with the following format:\n\n```json\n\"tech-id\": \"Tech Display Name\"\n```\n\nFor example:\n\n```json\n\"nextjs\": \"Next.js\"\n```\n\nMissing Tech(s):\n\n```\n'"$tech_error"'\n```"}' \ "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments") if [ "$response" -eq 201 ]; then diff --git a/scripts/update-readme.ts b/scripts/update-readme.ts index cdd187d..91ecfd0 100644 --- a/scripts/update-readme.ts +++ b/scripts/update-readme.ts @@ -20,6 +20,7 @@ async function loadTechs(): Promise { async function getExamples(techs: TechMapping): Promise { const examplesByTech: ExampleMapping = {}; + const missingTechs = new Set(); const folders = await fs.readdir("examples"); for (const folder of folders) { @@ -28,16 +29,12 @@ async function getExamples(techs: TechMapping): Promise { const config: ExampleConfig = await Bun.file(configPath).json(); if (!techs[config.tech]) { - const errorMsg = `Tech '${config.tech}' not found in techs.json. Please add it in the JSON format: "yourtech": "YourTech"`; - await Bun.write("error.log", errorMsg); - throw new Error(errorMsg); + missingTechs.add(config.tech); + continue; } const tech = techs[config.tech]; - - if (!examplesByTech[tech]) { - examplesByTech[tech] = []; - } + if (!examplesByTech[tech]) examplesByTech[tech] = []; examplesByTech[tech].push({ tech, @@ -50,6 +47,12 @@ async function getExamples(techs: TechMapping): Promise { } } + if (missingTechs.size > 0) { + const missingTechsMsg = [...missingTechs].join(", "); + await Bun.write("error.log", missingTechsMsg); + throw new Error(missingTechsMsg); + } + return examplesByTech; }