lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

Split up and organize `utils.ts` up into appropriate new folders, files

Open alectrocute opened this issue 1 year ago • 3 comments

We really need to split up and organize this file. Reading through it is laborious and taxing to the uninitiated.

I may be open to the task and will update this issue if/when I get started.

alectrocute avatar Jun 09 '23 17:06 alectrocute

100% agree. Feel free to break utils out into its own folder, with logical files, and a index.ts

Thanks!

dessalines avatar Jun 09 '23 20:06 dessalines

I'll make this my first task when I get up and running with my dev environment, @dessalines.

Any objection to omitting the index.ts and just importing each utility manually on the component/service/etc. file that it's used on?

alectrocute avatar Jun 10 '23 16:06 alectrocute

FWIW, IMO using index.ts as a barrel file yields a lot cleaner import rules.

robertnabbe avatar Jun 10 '23 23:06 robertnabbe