maptio icon indicating copy to clipboard operation
maptio copied to clipboard

Clean up imports by using path aliases and barrel files

Open rgoj opened this issue 4 years ago • 2 comments

Our imports are currently barely readable and difficult to write: Screenshot 2021-07-13 at 12 37 34

Using path aliases (especially for SharedModule!) and barrel files will make things much nicer. This can probably be done gradually.

Some resources:

  • https://levelup.gitconnected.com/shorter-import-paths-in-angular-8141734090e4
  • https://www.angularnation.net/posts/angular-architect-training-july-2021-week-1-session-style-and-structure-core-principles

rgoj avatar Jul 13 '21 11:07 rgoj

@maptio-shared is already set up (not barrel file, but at least the path alias), so this could be repeated elsewhere too.

rgoj avatar Aug 18 '21 13:08 rgoj

Going through some of the code and updating some of these might be a nice task to get started with the codebase, so adding the "good first issue" tag. Perhaps not a satisfying change from a user perspective, but certainly so from a clean code perspective :) Any PRs updating even a small number of files - to make some progress on this - welcome.

I'm not sure yet about using barrel files, haven't done that anywhere in the code, but certainly path aliases are there already in many places, so it'd be nice to spread that throughout the app.

rgoj avatar Apr 05 '22 14:04 rgoj