From 940609718a2668703faad40f9293cfc6efee946b Mon Sep 17 00:00:00 2001 From: weboko Date: Wed, 21 Dec 2022 23:30:02 +0100 Subject: [PATCH] move examples to dedicated folder, update create app and ci accordingly --- ci/Jenkinsfile | 7 +++-- {eth-pm => examples/eth-pm}/.env | 0 {eth-pm => examples/eth-pm}/.gitignore | 0 {eth-pm => examples/eth-pm}/.npmrc | 0 {eth-pm => examples/eth-pm}/README.md | 0 {eth-pm => examples/eth-pm}/craco.config.js | 0 {eth-pm => examples/eth-pm}/package.json | 0 {eth-pm => examples/eth-pm}/pnpm-lock.yaml | 0 .../eth-pm}/public/favicon.ico | Bin {eth-pm => examples/eth-pm}/public/index.html | 0 .../eth-pm}/public/logo192.png | Bin .../eth-pm}/public/logo512.png | Bin .../eth-pm}/public/manifest.json | 0 {eth-pm => examples/eth-pm}/public/robots.txt | 0 {eth-pm => examples/eth-pm}/src/App.css | 0 {eth-pm => examples/eth-pm}/src/App.tsx | 0 .../eth-pm}/src/BroadcastPublicKey.tsx | 0 .../eth-pm}/src/ConnectWallet.tsx | 0 {eth-pm => examples/eth-pm}/src/crypto.ts | 0 {eth-pm => examples/eth-pm}/src/index.css | 0 {eth-pm => examples/eth-pm}/src/index.tsx | 0 .../src/key_pair_handling/KeyPairHandling.tsx | 0 .../src/key_pair_handling/LoadKeyPair.tsx | 0 .../src/key_pair_handling/PasswordInput.tsx | 0 .../src/key_pair_handling/SaveKeyPair.tsx | 0 .../src/key_pair_handling/key_pair_storage.ts | 0 {eth-pm => examples/eth-pm}/src/logo.svg | 0 .../eth-pm}/src/messaging/Messages.tsx | 0 .../eth-pm}/src/messaging/Messaging.tsx | 0 .../eth-pm}/src/messaging/SendMessage.tsx | 0 .../eth-pm}/src/messaging/wire.ts | 0 .../eth-pm}/src/react-app-env.d.ts | 0 {eth-pm => examples/eth-pm}/src/setupTests.ts | 0 {eth-pm => examples/eth-pm}/src/waku.ts | 0 {eth-pm => examples/eth-pm}/tsconfig.json | 0 .../light-chat}/index.html | 0 {light-chat => examples/light-chat}/index.js | 0 .../light-chat}/package.json | 0 {light-chat => examples/light-chat}/style.css | 0 {light-js => examples/light-js}/README.md | 0 {light-js => examples/light-js}/index.html | 0 .../relay-angular-chat}/.gitignore | 0 .../relay-angular-chat}/README.md | 0 .../relay-angular-chat}/angular.json | 0 .../relay-angular-chat}/karma.conf.js | 0 .../relay-angular-chat}/package.json | 0 .../relay-angular-chat}/pnpm-lock.yaml | 0 .../src/@types/protons/types.d.ts | 0 .../src/@types/time-cache/types.d.ts | 0 .../src/app/app.component.css | 0 .../src/app/app.component.html | 0 .../src/app/app.component.spec.ts | 0 .../src/app/app.component.ts | 0 .../relay-angular-chat}/src/app/app.module.ts | 0 .../src/app/messages/messages.component.css | 0 .../src/app/messages/messages.component.html | 0 .../app/messages/messages.component.spec.ts | 0 .../src/app/messages/messages.component.ts | 0 .../src/app/waku.service.spec.ts | 0 .../src/app/waku.service.ts | 0 .../relay-angular-chat}/src/assets/.gitkeep | 0 .../src/environments/environment.prod.ts | 0 .../src/environments/environment.ts | 0 .../relay-angular-chat}/src/favicon.ico | Bin .../relay-angular-chat}/src/index.html | 0 .../relay-angular-chat}/src/main.ts | 0 .../relay-angular-chat}/src/styles.css | 0 .../relay-angular-chat}/src/test.ts | 0 .../relay-angular-chat}/tsconfig.app.json | 0 .../relay-angular-chat}/tsconfig.json | 0 .../relay-angular-chat}/tsconfig.spec.json | 0 {relay-js => examples/relay-js}/README.md | 0 {relay-js => examples/relay-js}/index.html | 0 .../relay-reactjs-chat}/.gitignore | 0 .../relay-reactjs-chat}/.npmrc | 0 .../relay-reactjs-chat}/README.md | 0 .../relay-reactjs-chat}/craco.config.js | 0 .../relay-reactjs-chat}/package.json | 0 .../relay-reactjs-chat}/pnpm-lock.yaml | 0 .../relay-reactjs-chat}/public/favicon.ico | Bin .../relay-reactjs-chat}/public/index.html | 0 .../relay-reactjs-chat}/public/logo192.png | Bin .../relay-reactjs-chat}/public/logo512.png | Bin .../relay-reactjs-chat}/public/manifest.json | 0 .../relay-reactjs-chat}/public/robots.txt | 0 .../relay-reactjs-chat}/src/App.css | 0 .../relay-reactjs-chat}/src/App.js | 0 .../relay-reactjs-chat}/src/App.test.js | 0 .../relay-reactjs-chat}/src/index.css | 0 .../relay-reactjs-chat}/src/index.js | 0 .../relay-reactjs-chat}/src/logo.svg | 0 .../relay-reactjs-chat}/src/setupTests.js | 0 {rln-js => examples/rln-js}/README.md | 0 {rln-js => examples/rln-js}/index.html | 0 {rln-js => examples/rln-js}/package.json | 0 {rln-js => examples/rln-js}/pnpm-lock.yaml | 0 {rln-js => examples/rln-js}/style.css | 0 {store-js => examples/store-js}/README.md | 0 {store-js => examples/store-js}/index.html | 0 .../store-reactjs-chat}/.gitignore | 0 .../store-reactjs-chat}/README.md | 0 .../store-reactjs-chat}/package.json | 0 .../store-reactjs-chat}/pnpm-lock.yaml | 0 .../store-reactjs-chat}/public/favicon.ico | Bin .../store-reactjs-chat}/public/index.html | 0 .../store-reactjs-chat}/public/logo192.png | Bin .../store-reactjs-chat}/public/logo512.png | Bin .../store-reactjs-chat}/public/manifest.json | 0 .../store-reactjs-chat}/public/robots.txt | 0 .../store-reactjs-chat}/src/App.css | 0 .../store-reactjs-chat}/src/App.js | 0 .../store-reactjs-chat}/src/App.test.js | 0 .../store-reactjs-chat}/src/index.css | 0 .../store-reactjs-chat}/src/index.js | 0 .../store-reactjs-chat}/src/logo.svg | 0 .../store-reactjs-chat}/src/setupTests.js | 0 {web-chat => examples/web-chat}/.env | 0 {web-chat => examples/web-chat}/.gitignore | 0 {web-chat => examples/web-chat}/.pnpmfile.cjs | 0 .../web-chat}/.prettierignore | 0 {web-chat => examples/web-chat}/README.md | 0 {web-chat => examples/web-chat}/buf.gen.yaml | 0 {web-chat => examples/web-chat}/buf.yaml | 0 {web-chat => examples/web-chat}/package.json | 0 .../web-chat}/pnpm-lock.yaml | 0 .../web-chat}/public/index.html | 0 .../web-chat}/public/manifest.json | 0 .../web-chat}/public/robots.txt | 0 {web-chat => examples/web-chat}/src/App.css | 0 {web-chat => examples/web-chat}/src/App.tsx | 0 .../web-chat}/src/ChatList.tsx | 0 .../web-chat}/src/Message.ts | 0 .../web-chat}/src/MessageInput.tsx | 0 {web-chat => examples/web-chat}/src/Room.tsx | 0 .../web-chat}/src/WakuContext.ts | 0 .../web-chat}/src/chat_message.ts | 0 .../web-chat}/src/command.ts | 0 {web-chat => examples/web-chat}/src/index.css | 0 {web-chat => examples/web-chat}/src/index.tsx | 0 .../web-chat}/src/proto/chat_message.proto | 0 .../web-chat}/src/proto/chat_message.ts | 0 .../web-chat}/src/react-app-env.d.ts | 0 .../web-chat}/src/setupTests.ts | 0 .../web-chat}/src/types/types.d.ts | 0 {web-chat => examples/web-chat}/tsconfig.json | 0 packages/create-waku-app/build.js | 28 +++++------------- packages/create-waku-app/createApp.js | 15 ++++++++-- packages/create-waku-app/index.js | 2 +- packages/create-waku-app/package.json | 12 -------- 149 files changed, 25 insertions(+), 39 deletions(-) rename {eth-pm => examples/eth-pm}/.env (100%) rename {eth-pm => examples/eth-pm}/.gitignore (100%) rename {eth-pm => examples/eth-pm}/.npmrc (100%) rename {eth-pm => examples/eth-pm}/README.md (100%) rename {eth-pm => examples/eth-pm}/craco.config.js (100%) rename {eth-pm => examples/eth-pm}/package.json (100%) rename {eth-pm => examples/eth-pm}/pnpm-lock.yaml (100%) rename {eth-pm => examples/eth-pm}/public/favicon.ico (100%) rename {eth-pm => examples/eth-pm}/public/index.html (100%) rename {eth-pm => examples/eth-pm}/public/logo192.png (100%) rename {eth-pm => examples/eth-pm}/public/logo512.png (100%) rename {eth-pm => examples/eth-pm}/public/manifest.json (100%) rename {eth-pm => examples/eth-pm}/public/robots.txt (100%) rename {eth-pm => examples/eth-pm}/src/App.css (100%) rename {eth-pm => examples/eth-pm}/src/App.tsx (100%) rename {eth-pm => examples/eth-pm}/src/BroadcastPublicKey.tsx (100%) rename {eth-pm => examples/eth-pm}/src/ConnectWallet.tsx (100%) rename {eth-pm => examples/eth-pm}/src/crypto.ts (100%) rename {eth-pm => examples/eth-pm}/src/index.css (100%) rename {eth-pm => examples/eth-pm}/src/index.tsx (100%) rename {eth-pm => examples/eth-pm}/src/key_pair_handling/KeyPairHandling.tsx (100%) rename {eth-pm => examples/eth-pm}/src/key_pair_handling/LoadKeyPair.tsx (100%) rename {eth-pm => examples/eth-pm}/src/key_pair_handling/PasswordInput.tsx (100%) rename {eth-pm => examples/eth-pm}/src/key_pair_handling/SaveKeyPair.tsx (100%) rename {eth-pm => examples/eth-pm}/src/key_pair_handling/key_pair_storage.ts (100%) rename {eth-pm => examples/eth-pm}/src/logo.svg (100%) rename {eth-pm => examples/eth-pm}/src/messaging/Messages.tsx (100%) rename {eth-pm => examples/eth-pm}/src/messaging/Messaging.tsx (100%) rename {eth-pm => examples/eth-pm}/src/messaging/SendMessage.tsx (100%) rename {eth-pm => examples/eth-pm}/src/messaging/wire.ts (100%) rename {eth-pm => examples/eth-pm}/src/react-app-env.d.ts (100%) rename {eth-pm => examples/eth-pm}/src/setupTests.ts (100%) rename {eth-pm => examples/eth-pm}/src/waku.ts (100%) rename {eth-pm => examples/eth-pm}/tsconfig.json (100%) rename {light-chat => examples/light-chat}/index.html (100%) rename {light-chat => examples/light-chat}/index.js (100%) rename {light-chat => examples/light-chat}/package.json (100%) rename {light-chat => examples/light-chat}/style.css (100%) rename {light-js => examples/light-js}/README.md (100%) rename {light-js => examples/light-js}/index.html (100%) rename {relay-angular-chat => examples/relay-angular-chat}/.gitignore (100%) rename {relay-angular-chat => examples/relay-angular-chat}/README.md (100%) rename {relay-angular-chat => examples/relay-angular-chat}/angular.json (100%) rename {relay-angular-chat => examples/relay-angular-chat}/karma.conf.js (100%) rename {relay-angular-chat => examples/relay-angular-chat}/package.json (100%) rename {relay-angular-chat => examples/relay-angular-chat}/pnpm-lock.yaml (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/@types/protons/types.d.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/@types/time-cache/types.d.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/app.component.css (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/app.component.html (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/app.component.spec.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/app.component.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/app.module.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/messages/messages.component.css (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/messages/messages.component.html (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/messages/messages.component.spec.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/messages/messages.component.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/waku.service.spec.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/app/waku.service.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/assets/.gitkeep (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/environments/environment.prod.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/environments/environment.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/favicon.ico (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/index.html (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/main.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/styles.css (100%) rename {relay-angular-chat => examples/relay-angular-chat}/src/test.ts (100%) rename {relay-angular-chat => examples/relay-angular-chat}/tsconfig.app.json (100%) rename {relay-angular-chat => examples/relay-angular-chat}/tsconfig.json (100%) rename {relay-angular-chat => examples/relay-angular-chat}/tsconfig.spec.json (100%) rename {relay-js => examples/relay-js}/README.md (100%) rename {relay-js => examples/relay-js}/index.html (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/.gitignore (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/.npmrc (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/README.md (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/craco.config.js (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/package.json (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/pnpm-lock.yaml (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/public/favicon.ico (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/public/index.html (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/public/logo192.png (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/public/logo512.png (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/public/manifest.json (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/public/robots.txt (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/App.css (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/App.js (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/App.test.js (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/index.css (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/index.js (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/logo.svg (100%) rename {relay-reactjs-chat => examples/relay-reactjs-chat}/src/setupTests.js (100%) rename {rln-js => examples/rln-js}/README.md (100%) rename {rln-js => examples/rln-js}/index.html (100%) rename {rln-js => examples/rln-js}/package.json (100%) rename {rln-js => examples/rln-js}/pnpm-lock.yaml (100%) rename {rln-js => examples/rln-js}/style.css (100%) rename {store-js => examples/store-js}/README.md (100%) rename {store-js => examples/store-js}/index.html (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/.gitignore (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/README.md (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/package.json (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/pnpm-lock.yaml (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/public/favicon.ico (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/public/index.html (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/public/logo192.png (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/public/logo512.png (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/public/manifest.json (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/public/robots.txt (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/App.css (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/App.js (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/App.test.js (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/index.css (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/index.js (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/logo.svg (100%) rename {store-reactjs-chat => examples/store-reactjs-chat}/src/setupTests.js (100%) rename {web-chat => examples/web-chat}/.env (100%) rename {web-chat => examples/web-chat}/.gitignore (100%) rename {web-chat => examples/web-chat}/.pnpmfile.cjs (100%) rename {web-chat => examples/web-chat}/.prettierignore (100%) rename {web-chat => examples/web-chat}/README.md (100%) rename {web-chat => examples/web-chat}/buf.gen.yaml (100%) rename {web-chat => examples/web-chat}/buf.yaml (100%) rename {web-chat => examples/web-chat}/package.json (100%) rename {web-chat => examples/web-chat}/pnpm-lock.yaml (100%) rename {web-chat => examples/web-chat}/public/index.html (100%) rename {web-chat => examples/web-chat}/public/manifest.json (100%) rename {web-chat => examples/web-chat}/public/robots.txt (100%) rename {web-chat => examples/web-chat}/src/App.css (100%) rename {web-chat => examples/web-chat}/src/App.tsx (100%) rename {web-chat => examples/web-chat}/src/ChatList.tsx (100%) rename {web-chat => examples/web-chat}/src/Message.ts (100%) rename {web-chat => examples/web-chat}/src/MessageInput.tsx (100%) rename {web-chat => examples/web-chat}/src/Room.tsx (100%) rename {web-chat => examples/web-chat}/src/WakuContext.ts (100%) rename {web-chat => examples/web-chat}/src/chat_message.ts (100%) rename {web-chat => examples/web-chat}/src/command.ts (100%) rename {web-chat => examples/web-chat}/src/index.css (100%) rename {web-chat => examples/web-chat}/src/index.tsx (100%) rename {web-chat => examples/web-chat}/src/proto/chat_message.proto (100%) rename {web-chat => examples/web-chat}/src/proto/chat_message.ts (100%) rename {web-chat => examples/web-chat}/src/react-app-env.d.ts (100%) rename {web-chat => examples/web-chat}/src/setupTests.ts (100%) rename {web-chat => examples/web-chat}/src/types/types.d.ts (100%) rename {web-chat => examples/web-chat}/tsconfig.json (100%) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 11f77c9..d9053ad 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -69,7 +69,7 @@ pipeline { def buildExample(example=STAGE_NAME) { def dest = "${WORKSPACE}/build/docs/${example}" - dir("${example}") { + dir("examples/${example}") { sh 'pnpm install --silent' sh 'pnpm run build' sh "mkdir -p ${dest}" @@ -79,6 +79,7 @@ def buildExample(example=STAGE_NAME) { def copyExample(example=STAGE_NAME) { sh "mkdir -p build/docs/${example}" - sh "cp ${example}/index.html build/docs/${example}/" - sh "[ -f ${example}/style.css ] && cp ${example}/style.css build/docs/${example}/ || exit 0" + sh "cp examples/${example}/*.html build/docs/${example}/" + sh "cp examples/${example}/*.js build/docs/${example}/" + sh "cp examples/${example}/*.css build/docs/${example}/" } diff --git a/eth-pm/.env b/examples/eth-pm/.env similarity index 100% rename from eth-pm/.env rename to examples/eth-pm/.env diff --git a/eth-pm/.gitignore b/examples/eth-pm/.gitignore similarity index 100% rename from eth-pm/.gitignore rename to examples/eth-pm/.gitignore diff --git a/eth-pm/.npmrc b/examples/eth-pm/.npmrc similarity index 100% rename from eth-pm/.npmrc rename to examples/eth-pm/.npmrc diff --git a/eth-pm/README.md b/examples/eth-pm/README.md similarity index 100% rename from eth-pm/README.md rename to examples/eth-pm/README.md diff --git a/eth-pm/craco.config.js b/examples/eth-pm/craco.config.js similarity index 100% rename from eth-pm/craco.config.js rename to examples/eth-pm/craco.config.js diff --git a/eth-pm/package.json b/examples/eth-pm/package.json similarity index 100% rename from eth-pm/package.json rename to examples/eth-pm/package.json diff --git a/eth-pm/pnpm-lock.yaml b/examples/eth-pm/pnpm-lock.yaml similarity index 100% rename from eth-pm/pnpm-lock.yaml rename to examples/eth-pm/pnpm-lock.yaml diff --git a/eth-pm/public/favicon.ico b/examples/eth-pm/public/favicon.ico similarity index 100% rename from eth-pm/public/favicon.ico rename to examples/eth-pm/public/favicon.ico diff --git a/eth-pm/public/index.html b/examples/eth-pm/public/index.html similarity index 100% rename from eth-pm/public/index.html rename to examples/eth-pm/public/index.html diff --git a/eth-pm/public/logo192.png b/examples/eth-pm/public/logo192.png similarity index 100% rename from eth-pm/public/logo192.png rename to examples/eth-pm/public/logo192.png diff --git a/eth-pm/public/logo512.png b/examples/eth-pm/public/logo512.png similarity index 100% rename from eth-pm/public/logo512.png rename to examples/eth-pm/public/logo512.png diff --git a/eth-pm/public/manifest.json b/examples/eth-pm/public/manifest.json similarity index 100% rename from eth-pm/public/manifest.json rename to examples/eth-pm/public/manifest.json diff --git a/eth-pm/public/robots.txt b/examples/eth-pm/public/robots.txt similarity index 100% rename from eth-pm/public/robots.txt rename to examples/eth-pm/public/robots.txt diff --git a/eth-pm/src/App.css b/examples/eth-pm/src/App.css similarity index 100% rename from eth-pm/src/App.css rename to examples/eth-pm/src/App.css diff --git a/eth-pm/src/App.tsx b/examples/eth-pm/src/App.tsx similarity index 100% rename from eth-pm/src/App.tsx rename to examples/eth-pm/src/App.tsx diff --git a/eth-pm/src/BroadcastPublicKey.tsx b/examples/eth-pm/src/BroadcastPublicKey.tsx similarity index 100% rename from eth-pm/src/BroadcastPublicKey.tsx rename to examples/eth-pm/src/BroadcastPublicKey.tsx diff --git a/eth-pm/src/ConnectWallet.tsx b/examples/eth-pm/src/ConnectWallet.tsx similarity index 100% rename from eth-pm/src/ConnectWallet.tsx rename to examples/eth-pm/src/ConnectWallet.tsx diff --git a/eth-pm/src/crypto.ts b/examples/eth-pm/src/crypto.ts similarity index 100% rename from eth-pm/src/crypto.ts rename to examples/eth-pm/src/crypto.ts diff --git a/eth-pm/src/index.css b/examples/eth-pm/src/index.css similarity index 100% rename from eth-pm/src/index.css rename to examples/eth-pm/src/index.css diff --git a/eth-pm/src/index.tsx b/examples/eth-pm/src/index.tsx similarity index 100% rename from eth-pm/src/index.tsx rename to examples/eth-pm/src/index.tsx diff --git a/eth-pm/src/key_pair_handling/KeyPairHandling.tsx b/examples/eth-pm/src/key_pair_handling/KeyPairHandling.tsx similarity index 100% rename from eth-pm/src/key_pair_handling/KeyPairHandling.tsx rename to examples/eth-pm/src/key_pair_handling/KeyPairHandling.tsx diff --git a/eth-pm/src/key_pair_handling/LoadKeyPair.tsx b/examples/eth-pm/src/key_pair_handling/LoadKeyPair.tsx similarity index 100% rename from eth-pm/src/key_pair_handling/LoadKeyPair.tsx rename to examples/eth-pm/src/key_pair_handling/LoadKeyPair.tsx diff --git a/eth-pm/src/key_pair_handling/PasswordInput.tsx b/examples/eth-pm/src/key_pair_handling/PasswordInput.tsx similarity index 100% rename from eth-pm/src/key_pair_handling/PasswordInput.tsx rename to examples/eth-pm/src/key_pair_handling/PasswordInput.tsx diff --git a/eth-pm/src/key_pair_handling/SaveKeyPair.tsx b/examples/eth-pm/src/key_pair_handling/SaveKeyPair.tsx similarity index 100% rename from eth-pm/src/key_pair_handling/SaveKeyPair.tsx rename to examples/eth-pm/src/key_pair_handling/SaveKeyPair.tsx diff --git a/eth-pm/src/key_pair_handling/key_pair_storage.ts b/examples/eth-pm/src/key_pair_handling/key_pair_storage.ts similarity index 100% rename from eth-pm/src/key_pair_handling/key_pair_storage.ts rename to examples/eth-pm/src/key_pair_handling/key_pair_storage.ts diff --git a/eth-pm/src/logo.svg b/examples/eth-pm/src/logo.svg similarity index 100% rename from eth-pm/src/logo.svg rename to examples/eth-pm/src/logo.svg diff --git a/eth-pm/src/messaging/Messages.tsx b/examples/eth-pm/src/messaging/Messages.tsx similarity index 100% rename from eth-pm/src/messaging/Messages.tsx rename to examples/eth-pm/src/messaging/Messages.tsx diff --git a/eth-pm/src/messaging/Messaging.tsx b/examples/eth-pm/src/messaging/Messaging.tsx similarity index 100% rename from eth-pm/src/messaging/Messaging.tsx rename to examples/eth-pm/src/messaging/Messaging.tsx diff --git a/eth-pm/src/messaging/SendMessage.tsx b/examples/eth-pm/src/messaging/SendMessage.tsx similarity index 100% rename from eth-pm/src/messaging/SendMessage.tsx rename to examples/eth-pm/src/messaging/SendMessage.tsx diff --git a/eth-pm/src/messaging/wire.ts b/examples/eth-pm/src/messaging/wire.ts similarity index 100% rename from eth-pm/src/messaging/wire.ts rename to examples/eth-pm/src/messaging/wire.ts diff --git a/eth-pm/src/react-app-env.d.ts b/examples/eth-pm/src/react-app-env.d.ts similarity index 100% rename from eth-pm/src/react-app-env.d.ts rename to examples/eth-pm/src/react-app-env.d.ts diff --git a/eth-pm/src/setupTests.ts b/examples/eth-pm/src/setupTests.ts similarity index 100% rename from eth-pm/src/setupTests.ts rename to examples/eth-pm/src/setupTests.ts diff --git a/eth-pm/src/waku.ts b/examples/eth-pm/src/waku.ts similarity index 100% rename from eth-pm/src/waku.ts rename to examples/eth-pm/src/waku.ts diff --git a/eth-pm/tsconfig.json b/examples/eth-pm/tsconfig.json similarity index 100% rename from eth-pm/tsconfig.json rename to examples/eth-pm/tsconfig.json diff --git a/light-chat/index.html b/examples/light-chat/index.html similarity index 100% rename from light-chat/index.html rename to examples/light-chat/index.html diff --git a/light-chat/index.js b/examples/light-chat/index.js similarity index 100% rename from light-chat/index.js rename to examples/light-chat/index.js diff --git a/light-chat/package.json b/examples/light-chat/package.json similarity index 100% rename from light-chat/package.json rename to examples/light-chat/package.json diff --git a/light-chat/style.css b/examples/light-chat/style.css similarity index 100% rename from light-chat/style.css rename to examples/light-chat/style.css diff --git a/light-js/README.md b/examples/light-js/README.md similarity index 100% rename from light-js/README.md rename to examples/light-js/README.md diff --git a/light-js/index.html b/examples/light-js/index.html similarity index 100% rename from light-js/index.html rename to examples/light-js/index.html diff --git a/relay-angular-chat/.gitignore b/examples/relay-angular-chat/.gitignore similarity index 100% rename from relay-angular-chat/.gitignore rename to examples/relay-angular-chat/.gitignore diff --git a/relay-angular-chat/README.md b/examples/relay-angular-chat/README.md similarity index 100% rename from relay-angular-chat/README.md rename to examples/relay-angular-chat/README.md diff --git a/relay-angular-chat/angular.json b/examples/relay-angular-chat/angular.json similarity index 100% rename from relay-angular-chat/angular.json rename to examples/relay-angular-chat/angular.json diff --git a/relay-angular-chat/karma.conf.js b/examples/relay-angular-chat/karma.conf.js similarity index 100% rename from relay-angular-chat/karma.conf.js rename to examples/relay-angular-chat/karma.conf.js diff --git a/relay-angular-chat/package.json b/examples/relay-angular-chat/package.json similarity index 100% rename from relay-angular-chat/package.json rename to examples/relay-angular-chat/package.json diff --git a/relay-angular-chat/pnpm-lock.yaml b/examples/relay-angular-chat/pnpm-lock.yaml similarity index 100% rename from relay-angular-chat/pnpm-lock.yaml rename to examples/relay-angular-chat/pnpm-lock.yaml diff --git a/relay-angular-chat/src/@types/protons/types.d.ts b/examples/relay-angular-chat/src/@types/protons/types.d.ts similarity index 100% rename from relay-angular-chat/src/@types/protons/types.d.ts rename to examples/relay-angular-chat/src/@types/protons/types.d.ts diff --git a/relay-angular-chat/src/@types/time-cache/types.d.ts b/examples/relay-angular-chat/src/@types/time-cache/types.d.ts similarity index 100% rename from relay-angular-chat/src/@types/time-cache/types.d.ts rename to examples/relay-angular-chat/src/@types/time-cache/types.d.ts diff --git a/relay-angular-chat/src/app/app.component.css b/examples/relay-angular-chat/src/app/app.component.css similarity index 100% rename from relay-angular-chat/src/app/app.component.css rename to examples/relay-angular-chat/src/app/app.component.css diff --git a/relay-angular-chat/src/app/app.component.html b/examples/relay-angular-chat/src/app/app.component.html similarity index 100% rename from relay-angular-chat/src/app/app.component.html rename to examples/relay-angular-chat/src/app/app.component.html diff --git a/relay-angular-chat/src/app/app.component.spec.ts b/examples/relay-angular-chat/src/app/app.component.spec.ts similarity index 100% rename from relay-angular-chat/src/app/app.component.spec.ts rename to examples/relay-angular-chat/src/app/app.component.spec.ts diff --git a/relay-angular-chat/src/app/app.component.ts b/examples/relay-angular-chat/src/app/app.component.ts similarity index 100% rename from relay-angular-chat/src/app/app.component.ts rename to examples/relay-angular-chat/src/app/app.component.ts diff --git a/relay-angular-chat/src/app/app.module.ts b/examples/relay-angular-chat/src/app/app.module.ts similarity index 100% rename from relay-angular-chat/src/app/app.module.ts rename to examples/relay-angular-chat/src/app/app.module.ts diff --git a/relay-angular-chat/src/app/messages/messages.component.css b/examples/relay-angular-chat/src/app/messages/messages.component.css similarity index 100% rename from relay-angular-chat/src/app/messages/messages.component.css rename to examples/relay-angular-chat/src/app/messages/messages.component.css diff --git a/relay-angular-chat/src/app/messages/messages.component.html b/examples/relay-angular-chat/src/app/messages/messages.component.html similarity index 100% rename from relay-angular-chat/src/app/messages/messages.component.html rename to examples/relay-angular-chat/src/app/messages/messages.component.html diff --git a/relay-angular-chat/src/app/messages/messages.component.spec.ts b/examples/relay-angular-chat/src/app/messages/messages.component.spec.ts similarity index 100% rename from relay-angular-chat/src/app/messages/messages.component.spec.ts rename to examples/relay-angular-chat/src/app/messages/messages.component.spec.ts diff --git a/relay-angular-chat/src/app/messages/messages.component.ts b/examples/relay-angular-chat/src/app/messages/messages.component.ts similarity index 100% rename from relay-angular-chat/src/app/messages/messages.component.ts rename to examples/relay-angular-chat/src/app/messages/messages.component.ts diff --git a/relay-angular-chat/src/app/waku.service.spec.ts b/examples/relay-angular-chat/src/app/waku.service.spec.ts similarity index 100% rename from relay-angular-chat/src/app/waku.service.spec.ts rename to examples/relay-angular-chat/src/app/waku.service.spec.ts diff --git a/relay-angular-chat/src/app/waku.service.ts b/examples/relay-angular-chat/src/app/waku.service.ts similarity index 100% rename from relay-angular-chat/src/app/waku.service.ts rename to examples/relay-angular-chat/src/app/waku.service.ts diff --git a/relay-angular-chat/src/assets/.gitkeep b/examples/relay-angular-chat/src/assets/.gitkeep similarity index 100% rename from relay-angular-chat/src/assets/.gitkeep rename to examples/relay-angular-chat/src/assets/.gitkeep diff --git a/relay-angular-chat/src/environments/environment.prod.ts b/examples/relay-angular-chat/src/environments/environment.prod.ts similarity index 100% rename from relay-angular-chat/src/environments/environment.prod.ts rename to examples/relay-angular-chat/src/environments/environment.prod.ts diff --git a/relay-angular-chat/src/environments/environment.ts b/examples/relay-angular-chat/src/environments/environment.ts similarity index 100% rename from relay-angular-chat/src/environments/environment.ts rename to examples/relay-angular-chat/src/environments/environment.ts diff --git a/relay-angular-chat/src/favicon.ico b/examples/relay-angular-chat/src/favicon.ico similarity index 100% rename from relay-angular-chat/src/favicon.ico rename to examples/relay-angular-chat/src/favicon.ico diff --git a/relay-angular-chat/src/index.html b/examples/relay-angular-chat/src/index.html similarity index 100% rename from relay-angular-chat/src/index.html rename to examples/relay-angular-chat/src/index.html diff --git a/relay-angular-chat/src/main.ts b/examples/relay-angular-chat/src/main.ts similarity index 100% rename from relay-angular-chat/src/main.ts rename to examples/relay-angular-chat/src/main.ts diff --git a/relay-angular-chat/src/styles.css b/examples/relay-angular-chat/src/styles.css similarity index 100% rename from relay-angular-chat/src/styles.css rename to examples/relay-angular-chat/src/styles.css diff --git a/relay-angular-chat/src/test.ts b/examples/relay-angular-chat/src/test.ts similarity index 100% rename from relay-angular-chat/src/test.ts rename to examples/relay-angular-chat/src/test.ts diff --git a/relay-angular-chat/tsconfig.app.json b/examples/relay-angular-chat/tsconfig.app.json similarity index 100% rename from relay-angular-chat/tsconfig.app.json rename to examples/relay-angular-chat/tsconfig.app.json diff --git a/relay-angular-chat/tsconfig.json b/examples/relay-angular-chat/tsconfig.json similarity index 100% rename from relay-angular-chat/tsconfig.json rename to examples/relay-angular-chat/tsconfig.json diff --git a/relay-angular-chat/tsconfig.spec.json b/examples/relay-angular-chat/tsconfig.spec.json similarity index 100% rename from relay-angular-chat/tsconfig.spec.json rename to examples/relay-angular-chat/tsconfig.spec.json diff --git a/relay-js/README.md b/examples/relay-js/README.md similarity index 100% rename from relay-js/README.md rename to examples/relay-js/README.md diff --git a/relay-js/index.html b/examples/relay-js/index.html similarity index 100% rename from relay-js/index.html rename to examples/relay-js/index.html diff --git a/relay-reactjs-chat/.gitignore b/examples/relay-reactjs-chat/.gitignore similarity index 100% rename from relay-reactjs-chat/.gitignore rename to examples/relay-reactjs-chat/.gitignore diff --git a/relay-reactjs-chat/.npmrc b/examples/relay-reactjs-chat/.npmrc similarity index 100% rename from relay-reactjs-chat/.npmrc rename to examples/relay-reactjs-chat/.npmrc diff --git a/relay-reactjs-chat/README.md b/examples/relay-reactjs-chat/README.md similarity index 100% rename from relay-reactjs-chat/README.md rename to examples/relay-reactjs-chat/README.md diff --git a/relay-reactjs-chat/craco.config.js b/examples/relay-reactjs-chat/craco.config.js similarity index 100% rename from relay-reactjs-chat/craco.config.js rename to examples/relay-reactjs-chat/craco.config.js diff --git a/relay-reactjs-chat/package.json b/examples/relay-reactjs-chat/package.json similarity index 100% rename from relay-reactjs-chat/package.json rename to examples/relay-reactjs-chat/package.json diff --git a/relay-reactjs-chat/pnpm-lock.yaml b/examples/relay-reactjs-chat/pnpm-lock.yaml similarity index 100% rename from relay-reactjs-chat/pnpm-lock.yaml rename to examples/relay-reactjs-chat/pnpm-lock.yaml diff --git a/relay-reactjs-chat/public/favicon.ico b/examples/relay-reactjs-chat/public/favicon.ico similarity index 100% rename from relay-reactjs-chat/public/favicon.ico rename to examples/relay-reactjs-chat/public/favicon.ico diff --git a/relay-reactjs-chat/public/index.html b/examples/relay-reactjs-chat/public/index.html similarity index 100% rename from relay-reactjs-chat/public/index.html rename to examples/relay-reactjs-chat/public/index.html diff --git a/relay-reactjs-chat/public/logo192.png b/examples/relay-reactjs-chat/public/logo192.png similarity index 100% rename from relay-reactjs-chat/public/logo192.png rename to examples/relay-reactjs-chat/public/logo192.png diff --git a/relay-reactjs-chat/public/logo512.png b/examples/relay-reactjs-chat/public/logo512.png similarity index 100% rename from relay-reactjs-chat/public/logo512.png rename to examples/relay-reactjs-chat/public/logo512.png diff --git a/relay-reactjs-chat/public/manifest.json b/examples/relay-reactjs-chat/public/manifest.json similarity index 100% rename from relay-reactjs-chat/public/manifest.json rename to examples/relay-reactjs-chat/public/manifest.json diff --git a/relay-reactjs-chat/public/robots.txt b/examples/relay-reactjs-chat/public/robots.txt similarity index 100% rename from relay-reactjs-chat/public/robots.txt rename to examples/relay-reactjs-chat/public/robots.txt diff --git a/relay-reactjs-chat/src/App.css b/examples/relay-reactjs-chat/src/App.css similarity index 100% rename from relay-reactjs-chat/src/App.css rename to examples/relay-reactjs-chat/src/App.css diff --git a/relay-reactjs-chat/src/App.js b/examples/relay-reactjs-chat/src/App.js similarity index 100% rename from relay-reactjs-chat/src/App.js rename to examples/relay-reactjs-chat/src/App.js diff --git a/relay-reactjs-chat/src/App.test.js b/examples/relay-reactjs-chat/src/App.test.js similarity index 100% rename from relay-reactjs-chat/src/App.test.js rename to examples/relay-reactjs-chat/src/App.test.js diff --git a/relay-reactjs-chat/src/index.css b/examples/relay-reactjs-chat/src/index.css similarity index 100% rename from relay-reactjs-chat/src/index.css rename to examples/relay-reactjs-chat/src/index.css diff --git a/relay-reactjs-chat/src/index.js b/examples/relay-reactjs-chat/src/index.js similarity index 100% rename from relay-reactjs-chat/src/index.js rename to examples/relay-reactjs-chat/src/index.js diff --git a/relay-reactjs-chat/src/logo.svg b/examples/relay-reactjs-chat/src/logo.svg similarity index 100% rename from relay-reactjs-chat/src/logo.svg rename to examples/relay-reactjs-chat/src/logo.svg diff --git a/relay-reactjs-chat/src/setupTests.js b/examples/relay-reactjs-chat/src/setupTests.js similarity index 100% rename from relay-reactjs-chat/src/setupTests.js rename to examples/relay-reactjs-chat/src/setupTests.js diff --git a/rln-js/README.md b/examples/rln-js/README.md similarity index 100% rename from rln-js/README.md rename to examples/rln-js/README.md diff --git a/rln-js/index.html b/examples/rln-js/index.html similarity index 100% rename from rln-js/index.html rename to examples/rln-js/index.html diff --git a/rln-js/package.json b/examples/rln-js/package.json similarity index 100% rename from rln-js/package.json rename to examples/rln-js/package.json diff --git a/rln-js/pnpm-lock.yaml b/examples/rln-js/pnpm-lock.yaml similarity index 100% rename from rln-js/pnpm-lock.yaml rename to examples/rln-js/pnpm-lock.yaml diff --git a/rln-js/style.css b/examples/rln-js/style.css similarity index 100% rename from rln-js/style.css rename to examples/rln-js/style.css diff --git a/store-js/README.md b/examples/store-js/README.md similarity index 100% rename from store-js/README.md rename to examples/store-js/README.md diff --git a/store-js/index.html b/examples/store-js/index.html similarity index 100% rename from store-js/index.html rename to examples/store-js/index.html diff --git a/store-reactjs-chat/.gitignore b/examples/store-reactjs-chat/.gitignore similarity index 100% rename from store-reactjs-chat/.gitignore rename to examples/store-reactjs-chat/.gitignore diff --git a/store-reactjs-chat/README.md b/examples/store-reactjs-chat/README.md similarity index 100% rename from store-reactjs-chat/README.md rename to examples/store-reactjs-chat/README.md diff --git a/store-reactjs-chat/package.json b/examples/store-reactjs-chat/package.json similarity index 100% rename from store-reactjs-chat/package.json rename to examples/store-reactjs-chat/package.json diff --git a/store-reactjs-chat/pnpm-lock.yaml b/examples/store-reactjs-chat/pnpm-lock.yaml similarity index 100% rename from store-reactjs-chat/pnpm-lock.yaml rename to examples/store-reactjs-chat/pnpm-lock.yaml diff --git a/store-reactjs-chat/public/favicon.ico b/examples/store-reactjs-chat/public/favicon.ico similarity index 100% rename from store-reactjs-chat/public/favicon.ico rename to examples/store-reactjs-chat/public/favicon.ico diff --git a/store-reactjs-chat/public/index.html b/examples/store-reactjs-chat/public/index.html similarity index 100% rename from store-reactjs-chat/public/index.html rename to examples/store-reactjs-chat/public/index.html diff --git a/store-reactjs-chat/public/logo192.png b/examples/store-reactjs-chat/public/logo192.png similarity index 100% rename from store-reactjs-chat/public/logo192.png rename to examples/store-reactjs-chat/public/logo192.png diff --git a/store-reactjs-chat/public/logo512.png b/examples/store-reactjs-chat/public/logo512.png similarity index 100% rename from store-reactjs-chat/public/logo512.png rename to examples/store-reactjs-chat/public/logo512.png diff --git a/store-reactjs-chat/public/manifest.json b/examples/store-reactjs-chat/public/manifest.json similarity index 100% rename from store-reactjs-chat/public/manifest.json rename to examples/store-reactjs-chat/public/manifest.json diff --git a/store-reactjs-chat/public/robots.txt b/examples/store-reactjs-chat/public/robots.txt similarity index 100% rename from store-reactjs-chat/public/robots.txt rename to examples/store-reactjs-chat/public/robots.txt diff --git a/store-reactjs-chat/src/App.css b/examples/store-reactjs-chat/src/App.css similarity index 100% rename from store-reactjs-chat/src/App.css rename to examples/store-reactjs-chat/src/App.css diff --git a/store-reactjs-chat/src/App.js b/examples/store-reactjs-chat/src/App.js similarity index 100% rename from store-reactjs-chat/src/App.js rename to examples/store-reactjs-chat/src/App.js diff --git a/store-reactjs-chat/src/App.test.js b/examples/store-reactjs-chat/src/App.test.js similarity index 100% rename from store-reactjs-chat/src/App.test.js rename to examples/store-reactjs-chat/src/App.test.js diff --git a/store-reactjs-chat/src/index.css b/examples/store-reactjs-chat/src/index.css similarity index 100% rename from store-reactjs-chat/src/index.css rename to examples/store-reactjs-chat/src/index.css diff --git a/store-reactjs-chat/src/index.js b/examples/store-reactjs-chat/src/index.js similarity index 100% rename from store-reactjs-chat/src/index.js rename to examples/store-reactjs-chat/src/index.js diff --git a/store-reactjs-chat/src/logo.svg b/examples/store-reactjs-chat/src/logo.svg similarity index 100% rename from store-reactjs-chat/src/logo.svg rename to examples/store-reactjs-chat/src/logo.svg diff --git a/store-reactjs-chat/src/setupTests.js b/examples/store-reactjs-chat/src/setupTests.js similarity index 100% rename from store-reactjs-chat/src/setupTests.js rename to examples/store-reactjs-chat/src/setupTests.js diff --git a/web-chat/.env b/examples/web-chat/.env similarity index 100% rename from web-chat/.env rename to examples/web-chat/.env diff --git a/web-chat/.gitignore b/examples/web-chat/.gitignore similarity index 100% rename from web-chat/.gitignore rename to examples/web-chat/.gitignore diff --git a/web-chat/.pnpmfile.cjs b/examples/web-chat/.pnpmfile.cjs similarity index 100% rename from web-chat/.pnpmfile.cjs rename to examples/web-chat/.pnpmfile.cjs diff --git a/web-chat/.prettierignore b/examples/web-chat/.prettierignore similarity index 100% rename from web-chat/.prettierignore rename to examples/web-chat/.prettierignore diff --git a/web-chat/README.md b/examples/web-chat/README.md similarity index 100% rename from web-chat/README.md rename to examples/web-chat/README.md diff --git a/web-chat/buf.gen.yaml b/examples/web-chat/buf.gen.yaml similarity index 100% rename from web-chat/buf.gen.yaml rename to examples/web-chat/buf.gen.yaml diff --git a/web-chat/buf.yaml b/examples/web-chat/buf.yaml similarity index 100% rename from web-chat/buf.yaml rename to examples/web-chat/buf.yaml diff --git a/web-chat/package.json b/examples/web-chat/package.json similarity index 100% rename from web-chat/package.json rename to examples/web-chat/package.json diff --git a/web-chat/pnpm-lock.yaml b/examples/web-chat/pnpm-lock.yaml similarity index 100% rename from web-chat/pnpm-lock.yaml rename to examples/web-chat/pnpm-lock.yaml diff --git a/web-chat/public/index.html b/examples/web-chat/public/index.html similarity index 100% rename from web-chat/public/index.html rename to examples/web-chat/public/index.html diff --git a/web-chat/public/manifest.json b/examples/web-chat/public/manifest.json similarity index 100% rename from web-chat/public/manifest.json rename to examples/web-chat/public/manifest.json diff --git a/web-chat/public/robots.txt b/examples/web-chat/public/robots.txt similarity index 100% rename from web-chat/public/robots.txt rename to examples/web-chat/public/robots.txt diff --git a/web-chat/src/App.css b/examples/web-chat/src/App.css similarity index 100% rename from web-chat/src/App.css rename to examples/web-chat/src/App.css diff --git a/web-chat/src/App.tsx b/examples/web-chat/src/App.tsx similarity index 100% rename from web-chat/src/App.tsx rename to examples/web-chat/src/App.tsx diff --git a/web-chat/src/ChatList.tsx b/examples/web-chat/src/ChatList.tsx similarity index 100% rename from web-chat/src/ChatList.tsx rename to examples/web-chat/src/ChatList.tsx diff --git a/web-chat/src/Message.ts b/examples/web-chat/src/Message.ts similarity index 100% rename from web-chat/src/Message.ts rename to examples/web-chat/src/Message.ts diff --git a/web-chat/src/MessageInput.tsx b/examples/web-chat/src/MessageInput.tsx similarity index 100% rename from web-chat/src/MessageInput.tsx rename to examples/web-chat/src/MessageInput.tsx diff --git a/web-chat/src/Room.tsx b/examples/web-chat/src/Room.tsx similarity index 100% rename from web-chat/src/Room.tsx rename to examples/web-chat/src/Room.tsx diff --git a/web-chat/src/WakuContext.ts b/examples/web-chat/src/WakuContext.ts similarity index 100% rename from web-chat/src/WakuContext.ts rename to examples/web-chat/src/WakuContext.ts diff --git a/web-chat/src/chat_message.ts b/examples/web-chat/src/chat_message.ts similarity index 100% rename from web-chat/src/chat_message.ts rename to examples/web-chat/src/chat_message.ts diff --git a/web-chat/src/command.ts b/examples/web-chat/src/command.ts similarity index 100% rename from web-chat/src/command.ts rename to examples/web-chat/src/command.ts diff --git a/web-chat/src/index.css b/examples/web-chat/src/index.css similarity index 100% rename from web-chat/src/index.css rename to examples/web-chat/src/index.css diff --git a/web-chat/src/index.tsx b/examples/web-chat/src/index.tsx similarity index 100% rename from web-chat/src/index.tsx rename to examples/web-chat/src/index.tsx diff --git a/web-chat/src/proto/chat_message.proto b/examples/web-chat/src/proto/chat_message.proto similarity index 100% rename from web-chat/src/proto/chat_message.proto rename to examples/web-chat/src/proto/chat_message.proto diff --git a/web-chat/src/proto/chat_message.ts b/examples/web-chat/src/proto/chat_message.ts similarity index 100% rename from web-chat/src/proto/chat_message.ts rename to examples/web-chat/src/proto/chat_message.ts diff --git a/web-chat/src/react-app-env.d.ts b/examples/web-chat/src/react-app-env.d.ts similarity index 100% rename from web-chat/src/react-app-env.d.ts rename to examples/web-chat/src/react-app-env.d.ts diff --git a/web-chat/src/setupTests.ts b/examples/web-chat/src/setupTests.ts similarity index 100% rename from web-chat/src/setupTests.ts rename to examples/web-chat/src/setupTests.ts diff --git a/web-chat/src/types/types.d.ts b/examples/web-chat/src/types/types.d.ts similarity index 100% rename from web-chat/src/types/types.d.ts rename to examples/web-chat/src/types/types.d.ts diff --git a/web-chat/tsconfig.json b/examples/web-chat/tsconfig.json similarity index 100% rename from web-chat/tsconfig.json rename to examples/web-chat/tsconfig.json diff --git a/packages/create-waku-app/build.js b/packages/create-waku-app/build.js index 5e7d272..c67efa1 100644 --- a/packages/create-waku-app/build.js +++ b/packages/create-waku-app/build.js @@ -2,33 +2,19 @@ const path = require("path"); const fs = require("fs-extra"); -const packageJson = require("./package.json"); -const examplesFolder = path.resolve("./examples"); +const examplesSource = path.resolve(__dirname, "../../examples"); +const examplesDestination = path.resolve(__dirname, "./examples"); -async function run() { - fs.ensureDirSync(examplesFolder); - - const supportedExamples = Object.entries(packageJson.wakuExamples); - - console.log("Started copying supported Waku examples."); - - const copyPromises = supportedExamples.map(async ([name, relativePath]) => { - const resolvedPath = path.resolve(__dirname, relativePath); - const destinationPath = path.resolve(examplesFolder, name); - - try { - await fs.copy(resolvedPath, destinationPath, { filter: nodeModulesFiler }); - } catch (error) { - console.error(`Failed to copy example ${name} to ${destinationPath} with ${error.message}`); - throw Error(error.message); - } - }); +function run() { + fs.ensureDirSync(examplesDestination); try { - await Promise.all(copyPromises); + console.log("Started copying supported Waku examples."); + fs.copySync(examplesSource, examplesDestination, { filter: nodeModulesFiler }); console.log("Finished copying examples."); } catch (error) { console.error("Failed to copy examples due to " + error.message); + throw Error(error.message); } } diff --git a/packages/create-waku-app/createApp.js b/packages/create-waku-app/createApp.js index 0b0ded4..aaf478c 100644 --- a/packages/create-waku-app/createApp.js +++ b/packages/create-waku-app/createApp.js @@ -7,10 +7,11 @@ const { Command } = require("commander"); const validateProjectName = require("validate-npm-package-name"); const supportedExamplesDir = path.resolve(__dirname, "./examples"); +const supportedExamples = readDirNames(supportedExamplesDir); -const init = async (name, description, version, supportedExamples) => { +const init = async (name, description, version) => { let appName; - let template; + let template; const options = new Command() .name(name) @@ -135,4 +136,14 @@ function terminateIfAppExists(appRoot) { } } +function readDirNames(target) { + return fs.readdirSync(target, { withFileTypes: true }) + .filter(dir => dir.isDirectory()) + .map(dir => dir.name) + .reduce((acc, name) => { + acc[name] = path.resolve(target, name); + return acc; + }, {}); +} + module.exports = { init }; \ No newline at end of file diff --git a/packages/create-waku-app/index.js b/packages/create-waku-app/index.js index c8bd301..db5ae19 100644 --- a/packages/create-waku-app/index.js +++ b/packages/create-waku-app/index.js @@ -16,4 +16,4 @@ if (!semver.satisfies(currentNodeVersion, supportedNodeVersion)) { const { init } = require("./createApp"); -init(packageJson.name, packageJson.description, packageJson.version, packageJson.wakuExamples); +init(packageJson.name, packageJson.description, packageJson.version); diff --git a/packages/create-waku-app/package.json b/packages/create-waku-app/package.json index 88f2ecd..e592a92 100644 --- a/packages/create-waku-app/package.json +++ b/packages/create-waku-app/package.json @@ -35,18 +35,6 @@ "dapps" ], "license": "MIT OR Apache-2.0", - "wakuExamples": { - "eth-pm": "../../eth-pm", - "light-js": "../../light-js", - "relay-angular-chat": "../../relay-angular-chat", - "relay-js": "../../relay-js", - "relay-reactjs-chat": "../../relay-reactjs-chat", - "rln-js": "../../rln-js", - "store-js": "../../store-js", - "store-reactjs-chat": "../../store-reactjs-chat", - "web-chat": "../../web-chat", - "light-chat": "../../light-chat" - }, "dependencies": { "commander": "^9.4.1", "enquirer": "^2.3.6",