Skip to content

Commit

Permalink
Merge pull request #1289 from push-protocol/uiweb-absolute-imports
Browse files Browse the repository at this point in the history
added relative imports for better management
  • Loading branch information
HarshRajat authored May 16, 2024
2 parents 7fa77e1 + 3115854 commit 9e7432e
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 2 deletions.
14 changes: 13 additions & 1 deletion packages/uiweb/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@
}
]
],
"plugins": [["styled-components", { "pure": true, "ssr": true }]]
"plugins": [
["styled-components", { "pure": true, "ssr": true }],
[
"module-resolver",
{
"root": ["./src"],
"alias": {
"components": "./src/lib/components"
// Add more aliases as needed
}
}
]
]
}
3 changes: 3 additions & 0 deletions packages/uiweb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@
"@pushprotocol/socket": "^0.5.0",
"react": ">=16.8.0",
"styled-components": "^6.0.8"
},
"devDependencies": {
"babel-plugin-module-resolver": "^5.0.2"
}
}
196 changes: 195 additions & 1 deletion packages/uiweb/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1791,6 +1791,7 @@ __metadata:
"@web3-onboard/walletconnect": "npm:^2.4.6"
"@web3-react/injected-connector": "npm:^6.0.7"
animejs: "npm:^2.2.0"
babel-plugin-module-resolver: "npm:^5.0.2"
classnames: "npm:^2.2.5"
date-fns: "npm:^2.28.0"
emoji-picker-react: "npm:^4.4.9"
Expand Down Expand Up @@ -3357,6 +3358,19 @@ __metadata:
languageName: node
linkType: hard

"babel-plugin-module-resolver@npm:^5.0.2":
version: 5.0.2
resolution: "babel-plugin-module-resolver@npm:5.0.2"
dependencies:
find-babel-config: "npm:^2.1.1"
glob: "npm:^9.3.3"
pkg-up: "npm:^3.1.0"
reselect: "npm:^4.1.7"
resolve: "npm:^1.22.8"
checksum: 10c0/ccbb9e673c4219f68937349267521becb72be292cf30bf70b861c3e709d24fbfa589da0bf6c100a0def799d38199299171cb6eac3fb00b1ea740373e2c1fe54c
languageName: node
linkType: hard

"balanced-match@npm:^1.0.0":
version: 1.0.2
resolution: "balanced-match@npm:1.0.2"
Expand Down Expand Up @@ -4483,6 +4497,25 @@ __metadata:
languageName: node
linkType: hard

"find-babel-config@npm:^2.1.1":
version: 2.1.1
resolution: "find-babel-config@npm:2.1.1"
dependencies:
json5: "npm:^2.2.3"
path-exists: "npm:^4.0.0"
checksum: 10c0/fb1f348027b83e9fe3b4163ec9c45719adab1205b2807708d660fe2a7beb5f812e0fabb6b21746cf0ef9c9fbf67bcc8e37f6cddb9d43229f0524767522d6110b
languageName: node
linkType: hard

"find-up@npm:^3.0.0":
version: 3.0.0
resolution: "find-up@npm:3.0.0"
dependencies:
locate-path: "npm:^3.0.0"
checksum: 10c0/2c2e7d0a26db858e2f624f39038c74739e38306dee42b45f404f770db357947be9d0d587f1cac72d20c114deb38aa57316e879eb0a78b17b46da7dab0a3bd6e3
languageName: node
linkType: hard

"find-up@npm:^4.1.0":
version: 4.1.0
resolution: "find-up@npm:4.1.0"
Expand Down Expand Up @@ -4535,6 +4568,13 @@ __metadata:
languageName: node
linkType: hard

"fs.realpath@npm:^1.0.0":
version: 1.0.0
resolution: "fs.realpath@npm:1.0.0"
checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948
languageName: node
linkType: hard

"fsevents@npm:~2.3.2":
version: 2.3.3
resolution: "fsevents@npm:2.3.3"
Expand All @@ -4554,6 +4594,13 @@ __metadata:
languageName: node
linkType: hard

"function-bind@npm:^1.1.2":
version: 1.1.2
resolution: "function-bind@npm:1.1.2"
checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5
languageName: node
linkType: hard

"get-caller-file@npm:^2.0.1":
version: 2.0.5
resolution: "get-caller-file@npm:2.0.5"
Expand Down Expand Up @@ -4616,6 +4663,18 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^9.3.3":
version: 9.3.5
resolution: "glob@npm:9.3.5"
dependencies:
fs.realpath: "npm:^1.0.0"
minimatch: "npm:^8.0.2"
minipass: "npm:^4.2.4"
path-scurry: "npm:^1.6.1"
checksum: 10c0/2f6c2b9ee019ee21dc258ae97a88719614591e4c979cb4580b1b9df6f0f778a3cb38b4bdaf18dfa584637ea10f89a3c5f2533a5e449cf8741514ad18b0951f2e
languageName: node
linkType: hard

"globalyzer@npm:0.1.0":
version: 0.1.0
resolution: "globalyzer@npm:0.1.0"
Expand Down Expand Up @@ -4665,6 +4724,15 @@ __metadata:
languageName: node
linkType: hard

"hasown@npm:^2.0.0":
version: 2.0.2
resolution: "hasown@npm:2.0.2"
dependencies:
function-bind: "npm:^1.1.2"
checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9
languageName: node
linkType: hard

"hast-util-parse-selector@npm:^2.0.0":
version: 2.2.5
resolution: "hast-util-parse-selector@npm:2.2.5"
Expand Down Expand Up @@ -4909,6 +4977,15 @@ __metadata:
languageName: node
linkType: hard

"is-core-module@npm:^2.13.0":
version: 2.13.1
resolution: "is-core-module@npm:2.13.1"
dependencies:
hasown: "npm:^2.0.0"
checksum: 10c0/2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518
languageName: node
linkType: hard

"is-decimal@npm:^1.0.0":
version: 1.0.4
resolution: "is-decimal@npm:1.0.4"
Expand Down Expand Up @@ -5123,6 +5200,15 @@ __metadata:
languageName: node
linkType: hard

"json5@npm:^2.2.3":
version: 2.2.3
resolution: "json5@npm:2.2.3"
bin:
json5: lib/cli.js
checksum: 10c0/5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c
languageName: node
linkType: hard

"keccak@npm:^3.0.3":
version: 3.0.4
resolution: "keccak@npm:3.0.4"
Expand Down Expand Up @@ -5246,6 +5332,16 @@ __metadata:
languageName: node
linkType: hard

"locate-path@npm:^3.0.0":
version: 3.0.0
resolution: "locate-path@npm:3.0.0"
dependencies:
p-locate: "npm:^3.0.0"
path-exists: "npm:^3.0.0"
checksum: 10c0/3db394b7829a7fe2f4fbdd25d3c4689b85f003c318c5da4052c7e56eed697da8f1bce5294f685c69ff76e32cba7a33629d94396976f6d05fb7f4c755c5e2ae8b
languageName: node
linkType: hard

"locate-path@npm:^5.0.0":
version: 5.0.0
resolution: "locate-path@npm:5.0.0"
Expand Down Expand Up @@ -5520,6 +5616,15 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^8.0.2":
version: 8.0.4
resolution: "minimatch@npm:8.0.4"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca
languageName: node
linkType: hard

"minimatch@npm:^9.0.1":
version: 9.0.4
resolution: "minimatch@npm:9.0.4"
Expand Down Expand Up @@ -5589,6 +5694,13 @@ __metadata:
languageName: node
linkType: hard

"minipass@npm:^4.2.4":
version: 4.2.8
resolution: "minipass@npm:4.2.8"
checksum: 10c0/4ea76b030d97079f4429d6e8a8affd90baf1b6a1898977c8ccce4701c5a2ba2792e033abc6709373f25c2c4d4d95440d9d5e9464b46b7b76ca44d2ce26d939ce
languageName: node
linkType: hard

"minipass@npm:^5.0.0":
version: 5.0.0
resolution: "minipass@npm:5.0.0"
Expand Down Expand Up @@ -5883,7 +5995,7 @@ __metadata:
languageName: node
linkType: hard

"p-limit@npm:^2.2.0":
"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0":
version: 2.3.0
resolution: "p-limit@npm:2.3.0"
dependencies:
Expand All @@ -5892,6 +6004,15 @@ __metadata:
languageName: node
linkType: hard

"p-locate@npm:^3.0.0":
version: 3.0.0
resolution: "p-locate@npm:3.0.0"
dependencies:
p-limit: "npm:^2.0.0"
checksum: 10c0/7b7f06f718f19e989ce6280ed4396fb3c34dabdee0df948376483032f9d5ec22fdf7077ec942143a75827bb85b11da72016497fc10dac1106c837ed593969ee8
languageName: node
linkType: hard

"p-locate@npm:^4.1.0":
version: 4.1.0
resolution: "p-locate@npm:4.1.0"
Expand Down Expand Up @@ -5931,6 +6052,13 @@ __metadata:
languageName: node
linkType: hard

"path-exists@npm:^3.0.0":
version: 3.0.0
resolution: "path-exists@npm:3.0.0"
checksum: 10c0/17d6a5664bc0a11d48e2b2127d28a0e58822c6740bde30403f08013da599182289c56518bec89407e3f31d3c2b6b296a4220bc3f867f0911fee6952208b04167
languageName: node
linkType: hard

"path-exists@npm:^4.0.0":
version: 4.0.0
resolution: "path-exists@npm:4.0.0"
Expand All @@ -5952,6 +6080,13 @@ __metadata:
languageName: node
linkType: hard

"path-parse@npm:^1.0.7":
version: 1.0.7
resolution: "path-parse@npm:1.0.7"
checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1
languageName: node
linkType: hard

"path-scurry@npm:^1.10.2":
version: 1.10.2
resolution: "path-scurry@npm:1.10.2"
Expand All @@ -5962,6 +6097,16 @@ __metadata:
languageName: node
linkType: hard

"path-scurry@npm:^1.6.1":
version: 1.11.1
resolution: "path-scurry@npm:1.11.1"
dependencies:
lru-cache: "npm:^10.2.0"
minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0"
checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d
languageName: node
linkType: hard

"pathe@npm:^1.1.1, pathe@npm:^1.1.2":
version: 1.1.2
resolution: "pathe@npm:1.1.2"
Expand Down Expand Up @@ -6053,6 +6198,15 @@ __metadata:
languageName: node
linkType: hard

"pkg-up@npm:^3.1.0":
version: 3.1.0
resolution: "pkg-up@npm:3.1.0"
dependencies:
find-up: "npm:^3.0.0"
checksum: 10c0/ecb60e1f8e1f611c0bdf1a0b6a474d6dfb51185567dc6f29cdef37c8d480ecba5362e006606bb290519bbb6f49526c403fabea93c3090c20368d98bb90c999ab
languageName: node
linkType: hard

"pngjs@npm:^5.0.0":
version: 5.0.0
resolution: "pngjs@npm:5.0.0"
Expand Down Expand Up @@ -6487,6 +6641,39 @@ __metadata:
languageName: node
linkType: hard

"reselect@npm:^4.1.7":
version: 4.1.8
resolution: "reselect@npm:4.1.8"
checksum: 10c0/06a305a504affcbb67dd0561ddc8306b35796199c7e15b38934c80606938a021eadcf68cfd58e7bb5e17786601c37602a3362a4665c7bf0a96c1041ceee9d0b7
languageName: node
linkType: hard

"resolve@npm:^1.22.8":
version: 1.22.8
resolution: "resolve@npm:1.22.8"
dependencies:
is-core-module: "npm:^2.13.0"
path-parse: "npm:^1.0.7"
supports-preserve-symlinks-flag: "npm:^1.0.0"
bin:
resolve: bin/resolve
checksum: 10c0/07e179f4375e1fd072cfb72ad66d78547f86e6196c4014b31cb0b8bb1db5f7ca871f922d08da0fbc05b94e9fd42206f819648fa3b5b873ebbc8e1dc68fec433a
languageName: node
linkType: hard

"resolve@patch:resolve@npm%3A^1.22.8#optional!builtin<compat/resolve>":
version: 1.22.8
resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
dependencies:
is-core-module: "npm:^2.13.0"
path-parse: "npm:^1.0.7"
supports-preserve-symlinks-flag: "npm:^1.0.0"
bin:
resolve: bin/resolve
checksum: 10c0/0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729
languageName: node
linkType: hard

"retry@npm:^0.12.0":
version: 0.12.0
resolution: "retry@npm:0.12.0"
Expand Down Expand Up @@ -6880,6 +7067,13 @@ __metadata:
languageName: node
linkType: hard

"supports-preserve-symlinks-flag@npm:^1.0.0":
version: 1.0.0
resolution: "supports-preserve-symlinks-flag@npm:1.0.0"
checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39
languageName: node
linkType: hard

"svelte-i18n@npm:^3.3.13":
version: 3.7.4
resolution: "svelte-i18n@npm:3.7.4"
Expand Down

0 comments on commit 9e7432e

Please sign in to comment.