From 3ca2b12dfc333ae92228b39c9078be74a01beee7 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Tue, 9 Aug 2022 12:36:16 +0200 Subject: [PATCH] chore: add @revoltchat/ui as a submodule --- .gitmodules | 3 +++ README.md | 2 ++ external/components | 1 + external/lang | 2 +- package.json | 3 ++- scripts/publish.sh | 4 ++++ yarn.lock | 30 ++++++++---------------------- 7 files changed, 21 insertions(+), 24 deletions(-) create mode 160000 external/components diff --git a/.gitmodules b/.gitmodules index 14a79276..f14a83d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "external/lang"] path = external/lang url = https://github.com/revoltchat/translations +[submodule "external/components"] + path = external/components + url = https://github.com/revoltchat/components diff --git a/README.md b/README.md index 49d4ac3b..a2a6302e 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Get revite up and running locally. git clone --recursive https://github.com/revoltchat/revite cd revite yarn +yarn build:components yarn dev ``` @@ -55,6 +56,7 @@ You can now access the client at http://local.revolt.chat:3000. | `yarn pull` | Setup assets required for Revite. | | `yarn dev` | Start the Revolt client in development mode. | | `yarn build` | Build the Revolt client. | +| `yarn build:components` | Build the Revolt components library. | | `yarn preview` | Start a local server with the built client. | | `yarn lint` | Run ESLint on the client. | | `yarn fmt` | Run Prettier on the client. | diff --git a/external/components b/external/components new file mode 160000 index 00000000..8cdba8de --- /dev/null +++ b/external/components @@ -0,0 +1 @@ +Subproject commit 8cdba8ded56d3c1a84d50330b58d71f74ea698bf diff --git a/external/lang b/external/lang index 81526bc7..bec6b0be 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit 81526bc70e39a90d6e64a60c34d7d4478b95b05a +Subproject commit bec6b0be505fdf89f15d0174391914cd73e14dc1 diff --git a/package.json b/package.json index 03ab561c..c854cb16 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "scripts": { "dev": "node scripts/setup_assets.js --check && vite", "pull": "node scripts/setup_assets.js", + "build:components": "cd external && cd components && yarn && yarn build", "build": "rimraf build && node scripts/setup_assets.js --check && vite build", "build:highmem": "NODE_OPTIONS='--max-old-space-size=4096' yarn build", "preview": "vite preview", @@ -75,7 +76,7 @@ "@hcaptcha/react-hcaptcha": "^0.3.6", "@insertish/vite-plugin-babel-macros": "^1.0.5", "@preact/preset-vite": "^2.0.0", - "@revoltchat/ui": "1.0.77", + "@revoltchat/ui": "link:./external/components", "@rollup/plugin-replace": "^2.4.2", "@styled-icons/boxicons-logos": "^10.38.0", "@styled-icons/boxicons-regular": "^10.38.0", diff --git a/scripts/publish.sh b/scripts/publish.sh index b3b957f0..be337b68 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -14,8 +14,12 @@ POST_INSTALL="pm2 restart revite" export REVOLT_SAAS=https://github.com/revoltchat/assets +# Exit when any command fails +set -e + # 1. Build Revite yarn +yarn build:components yarn build # 2. Archive built files diff --git a/yarn.lock b/yarn.lock index bc412427..6e0bc86b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2281,25 +2281,11 @@ __metadata: languageName: node linkType: hard -"@revoltchat/ui@npm:1.0.77": - version: 1.0.77 - resolution: "@revoltchat/ui@npm:1.0.77" - dependencies: - "@styled-icons/boxicons-logos": ^10.38.0 - "@styled-icons/boxicons-regular": ^10.38.0 - "@styled-icons/boxicons-solid": ^10.38.0 - "@tippyjs/react": ^4.2.6 - mobx: ^6.6.0 - mobx-react-lite: ^3.4.0 - prismjs: ^1.28.0 - react-beautiful-dnd: ^13.1.0 - react-device-detect: ^2.2.2 - react-virtuoso: ^2.12.0 - peerDependencies: - revolt.js: "*" - checksum: ac3cf9787ff11df2156db0e871e48072013d0827b14b5dbcb54e9fe7f8f97daa19325d0fda93ded7487c642df57d6aee998bbe0ccf20bb095b1027f247e47e64 +"@revoltchat/ui@link:./external/components::locator=client%40workspace%3A.": + version: 0.0.0-use.local + resolution: "@revoltchat/ui@link:./external/components::locator=client%40workspace%3A." languageName: node - linkType: hard + linkType: soft "@rollup/plugin-babel@npm:^5.2.0": version: 5.3.0 @@ -2446,7 +2432,7 @@ __metadata: languageName: node linkType: hard -"@tippyjs/react@npm:4.2.6, @tippyjs/react@npm:^4.2.6": +"@tippyjs/react@npm:4.2.6": version: 4.2.6 resolution: "@tippyjs/react@npm:4.2.6" dependencies: @@ -3678,7 +3664,7 @@ __metadata: "@hcaptcha/react-hcaptcha": ^0.3.6 "@insertish/vite-plugin-babel-macros": ^1.0.5 "@preact/preset-vite": ^2.0.0 - "@revoltchat/ui": 1.0.77 + "@revoltchat/ui": "link:./external/components" "@rollup/plugin-replace": ^2.4.2 "@styled-icons/boxicons-logos": ^10.38.0 "@styled-icons/boxicons-regular": ^10.38.0 @@ -6909,7 +6895,7 @@ __metadata: languageName: node linkType: hard -"mobx-react-lite@npm:3.4.0, mobx-react-lite@npm:^3.4.0": +"mobx-react-lite@npm:3.4.0": version: 3.4.0 resolution: "mobx-react-lite@npm:3.4.0" peerDependencies: @@ -7467,7 +7453,7 @@ __metadata: languageName: node linkType: hard -"react-device-detect@npm:2.2.2, react-device-detect@npm:^2.2.2": +"react-device-detect@npm:2.2.2": version: 2.2.2 resolution: "react-device-detect@npm:2.2.2" dependencies: