Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore-mobile: use mobile path aliases #5922

Merged
merged 14 commits into from Feb 24, 2023
Merged

Conversation

begonaalvarezd
Copy link
Member

@begonaalvarezd begonaalvarezd commented Feb 19, 2023

Summary

Please summarize your changes, describing what they are and why they were made.

This PR aims to use path aliases in the mobile folder, wherever possible.

  • Use already existing path aliases
  • Create generic @/* alias for the local lib folder, eg @/contexts/settings, @/routers, ...

Please note that because we still use electron to run mobile, some tweaks need to be made in the local setup to have the aliases working locally.

Instructions:

packages/desktop/tsconfig.json

"@auxiliary/*": ["../shared/lib/auxiliary/*"],
"@contexts/*": ["../shared/lib/contexts/*"],
"@components": ["../mobile/components"],
"@core/*": ["../shared/lib/core/*"],
"@features/*": ["../mobile/features/*"],
"@lib/*": ["../shared/lib/*"],
"@ui": ["../shared/components"],
"@ui/*": ["../shared/components/*"],
"@views": ["../mobile/views"],
"@/*": ["../mobile/lib/*"],

packages/desktop/webpack.config.js

svelte: path.dirname(require.resolve('svelte/package.json')),
'@auxiliary': path.resolve(__dirname, '../shared/lib/auxiliary'),
'@contexts': path.resolve(__dirname, '../shared/lib/contexts'),
'@components': path.resolve(__dirname, '../mobile/components/'),
'@core': path.resolve(__dirname, '../shared/lib/core'),
'@features': path.resolve(__dirname, '../mobile/features'),
'@lib': path.resolve(__dirname, '../shared/lib'),
'@ui': path.resolve(__dirname, '../shared/components/'),
'@views': path.resolve(__dirname, '../mobile/views/'),
'@': path.resolve(__dirname, '../mobile/lib/'),

Close #4724

Changelog

- chore-mobile: use mobile path aliases

Testing

Platforms

Please select any platforms where your changes have been tested.

  • Desktop
    • MacOS
    • Linux
    • Windows
  • Mobile
    • iOS
    • Android

Instructions

Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.

...

Checklist

Please tick the following boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

Copy link
Contributor

@maxwellmattryan maxwellmattryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Will approve once conflicts are resolved 🙏

Copy link
Contributor

@maxwellmattryan maxwellmattryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@begonaalvarezd begonaalvarezd merged commit 62b04db into develop Feb 24, 2023
@begonaalvarezd begonaalvarezd deleted the chore/mobile-path-aliases branch February 24, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:chore House-keeping etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Add @mobile path alias
4 participants