Icons package and monorepo #790
Replies: 3 comments 7 replies
-
Would it make sense to create a django-components organisation under which django-components itself and such component packages are placed? |
Beta Was this translation helpful? Give feedback.
-
Several thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Just a note - I tried to make a package with the icon component, but there is a bug that's blocking me. Currently we try to resolve the paths to HTML / JS / CSS at component class creation. But this causes this logic to run before Django is loaded, which throws. We need to do it lazily. |
Beta Was this translation helpful? Give feedback.
-
I came across this package, cotton-heroicons, that wraps HeroIcons.com icons as django-cotton components.
I use HeroIcons in my work project too, and I too made a component that wraps the icons (see implementation at the end), so I thought I could also package that for others to use.
However, I'm thinking that it would be nice if it could live in this project. I had other projects where there was a lot of small packages that dependend on each other and they lived in different repos, and updating them was always a chore.
Ofc, if it was somebody else, I would probably suggest them to create a separate repo. But since I'm so involved with django-components, then I'm thinking it could be practically like an "officially supported package", and live in django-components repo.
But to make that possible, the repo would have to support monorepo structure.
One way to achieve that would be to move the root of the project inside
src/django_components
, and update other bits (like github workflows) accordingly to point to the new path.Other, simpler approach, could be to just add a
packages
directory (e.g.packages/django-components-icons
), and put the extra packages there. In that case we'd just need to update github workflows (and maybe dependabot), to pick up also those packages.I'd go with the second approach for the simplicity, and then one day we could potentially move also the main package.
@EmilStenstrom What do you think?
Implementation:
Python
Django HTML
Beta Was this translation helpful? Give feedback.
All reactions