Browse Source

chore: move hoppscotch-ui package out of the monorepo (#3620)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Anwarul Islam 1 year ago
parent
commit
f93558324f

+ 1 - 4
.gitignore

@@ -81,10 +81,7 @@ web_modules/
 
 # dotenv environment variable files
 .env
-.env.development.local
-.env.test.local
-.env.production.local
-.env.local
+.env.*
 
 # parcel-bundler cache (https://parceljs.org/)
 .cache

+ 1 - 0
package.json

@@ -25,6 +25,7 @@
   "devDependencies": {
     "@commitlint/cli": "^16.2.3",
     "@commitlint/config-conventional": "^16.2.1",
+    "@hoppscotch/ui": "^0.1.0",
     "@types/node": "17.0.27",
     "cross-env": "^7.0.3",
     "http-server": "^14.1.1",

+ 1 - 1
packages/hoppscotch-common/package.json

@@ -36,7 +36,7 @@
     "@hoppscotch/codemirror-lang-graphql": "workspace:^",
     "@hoppscotch/data": "workspace:^",
     "@hoppscotch/js-sandbox": "workspace:^",
-    "@hoppscotch/ui": "workspace:^",
+    "@hoppscotch/ui": "^0.1.0",
     "@hoppscotch/vue-toasted": "^0.1.0",
     "@lezer/highlight": "1.2.0",
     "@unhead/vue": "^1.8.8",

+ 1 - 4
packages/hoppscotch-common/src/components/collections/MyCollections.vue

@@ -341,10 +341,7 @@ import IconImport from "~icons/lucide/folder-down"
 import { HoppCollection, HoppRESTRequest } from "@hoppscotch/data"
 import { computed, PropType, Ref, toRef } from "vue"
 import { GetMyTeamsQuery } from "~/helpers/backend/graphql"
-import {
-  ChildrenResult,
-  SmartTreeAdapter,
-} from "@hoppscotch/ui/dist/helpers/treeAdapter"
+import { ChildrenResult, SmartTreeAdapter } from "@hoppscotch/ui/helpers"
 import { useI18n } from "@composables/i18n"
 import { useColorMode } from "@composables/theming"
 import { pipe } from "fp-ts/function"

+ 1 - 4
packages/hoppscotch-common/src/components/collections/TeamCollections.vue

@@ -366,10 +366,7 @@ import { useI18n } from "@composables/i18n"
 import { useColorMode } from "@composables/theming"
 import { TeamCollection } from "~/helpers/teams/TeamCollection"
 import { TeamRequest } from "~/helpers/teams/TeamRequest"
-import {
-  ChildrenResult,
-  SmartTreeAdapter,
-} from "@hoppscotch/ui/dist/helpers/treeAdapter"
+import { ChildrenResult, SmartTreeAdapter } from "@hoppscotch/ui/helpers"
 import { cloneDeep } from "lodash-es"
 import { HoppRESTRequest } from "@hoppscotch/data"
 import { pipe } from "fp-ts/function"

+ 2 - 2
packages/hoppscotch-selfhost-web/package.json

@@ -28,6 +28,7 @@
     "@fontsource-variable/roboto-mono": "^5.0.16",
     "@hoppscotch/common": "workspace:^",
     "@hoppscotch/data": "workspace:^",
+    "@hoppscotch/ui": "^0.1.0",
     "@import-meta-env/unplugin": "^0.4.10",
     "axios": "^1.6.2",
     "buffer": "^6.0.3",
@@ -49,7 +50,6 @@
     "@graphql-codegen/typescript-urql-graphcache": "^3.0.0",
     "@graphql-codegen/urql-introspection": "^3.0.0",
     "@graphql-typed-document-node/core": "^3.2.0",
-    "@hoppscotch/ui": "workspace:^",
     "@intlify/vite-plugin-vue-i18n": "^7.0.0",
     "@rushstack/eslint-patch": "^1.6.0",
     "@typescript-eslint/eslint-plugin": "^6.12.0",
@@ -81,4 +81,4 @@
     "vite-plugin-vue-layouts": "^0.8.0",
     "vue-tsc": "^1.8.22"
   }
-}
+}

+ 4 - 3
packages/hoppscotch-selfhost-web/postcss.config.cjs

@@ -1,7 +1,8 @@
-const postcssConfig = require("@hoppscotch/ui/postcss.config")
-
 const config = {
-  ...postcssConfig,
+  plugins: {
+    tailwindcss: {},
+    autoprefixer: {},
+  },
 }
 
 module.exports = config

+ 1 - 4
packages/hoppscotch-selfhost-web/tailwind.config.ts

@@ -2,10 +2,7 @@ import { Config } from "tailwindcss"
 import preset from "@hoppscotch/ui/ui-preset"
 
 export default {
-  content: [
-    "../hoppscotch-common/src/**/*.{vue,html}",
-    "../hoppscotch-ui/src/**/*.{vue,html}",
-  ],
+  content: ["../hoppscotch-common/src/**/*.{vue,html}"],
   presets: [preset],
   theme: {
     extend: {

+ 1 - 4
packages/hoppscotch-selfhost-web/vite.config.ts

@@ -117,10 +117,7 @@ export default defineConfig({
     }),
     Components({
       dts: "../hoppscotch-common/src/components.d.ts",
-      dirs: [
-        "../hoppscotch-common/src/components",
-        "../hoppscotch-ui/src/components",
-      ],
+      dirs: ["../hoppscotch-common/src/components"],
       directoryAsNamespace: true,
       resolvers: [
         IconResolver({

+ 3 - 2
packages/hoppscotch-sh-admin/package.json

@@ -17,7 +17,7 @@
     "@fontsource-variable/material-symbols-rounded": "^5.0.5",
     "@fontsource-variable/roboto-mono": "^5.0.6",
     "@graphql-typed-document-node/core": "^3.1.1",
-    "@hoppscotch/ui": "workspace:^",
+    "@hoppscotch/ui": "^0.1.0",
     "@hoppscotch/vue-toasted": "^0.1.0",
     "@intlify/unplugin-vue-i18n": "^1.2.0",
     "@types/cors": "^2.8.13",
@@ -37,7 +37,7 @@
     "postcss": "^8.4.23",
     "prettier-plugin-tailwindcss": "^0.5.6",
     "rxjs": "^7.8.0",
-    "tailwindcss": "^3.3.2",
+    "tailwindcss": "^3.3.5",
     "tippy.js": "^6.3.7",
     "ts-node-dev": "^2.0.0",
     "unplugin-icons": "^0.14.9",
@@ -48,6 +48,7 @@
     "vue-tippy": "6.0.0-alpha.58"
   },
   "devDependencies": {
+    "hoppscotch-backend": "workspace:^",
     "@graphql-codegen/cli": "3.0.0",
     "@graphql-codegen/client-preset": "^2.0.0",
     "@graphql-codegen/introspection": "3.0.0",

Some files were not shown because too many files changed in this diff