Maybe there's a better way to do this, but I'm trying to organize my Flask application so that both static Javascript and HTML templates sit in the same folder (similar to components)
This is just for organization purposes, I won't be rendering the statics in jinja2
So, instead of this :
├── templates/
│ ├── login.html
├── static/
│ ├── login.js
I'm looking for this (just an idea):
├── components/
│ ├── login/
│ │ ├── login.html
│ │ └── login.js
Or maybe this, so I can make a wrapper that renders a component just by its folder name, ex: return render_component('login')
├── components/
│ ├── login/
│ │ ├── template.html
│ │ └── login.js
The concept is that inside login.html template it adds a script tag with url_for to login.js
I'm also open to different ideas/ways to achieve this component structure