Open glogiotatidis opened 9 years ago
FWIW, over on Idea Town we started from sugardough. We use gulp to process JS & etc, while Django focuses on the server side of things (ie. APIs & etc). I don't think django-pipeline would help us much.
I'm more and more leaning towards this. I.e. not letting Django do any templates or static assets.
The reason I started playing with pipeline in my fresh new sugardough project was because I was using OAuth and I wanted to do things like
{% if request.user.is_authenticated() %}
<form method="post" action="/add/thing">
...
{% else %}
<a href="/accounts/github/login/">Sign in will ya</a>
{% endif %}
However, all of that can be done with angular/react/jquery if you first do a quick AJAX request to see if the user has a cookie.
It's the future man!
If we go the grunt/gulp root, which I am not against at all, can we perhaps add some info/boilerplate on getting this going?
If we go the grunt/gulp root, which I am not against at all, can we perhaps add some info/boilerplate on getting this going?
Yeah, that could be helpful. We're kind of bumbling along with the client build stuff in its own Docker container separate from Django, but I'm not convinced that's a great way to do it.
@schalkneethling I think we should not. The field is moving too fast. For example, who uses Grunt anyways these days? That's soo last month.
I bet most, like me, just copy-n-paste some gulpfile.js or webpack.config.js from their last project and mod along. I would not dare to settle on a standard for all to use. It'd be like pitching a tent in a raging sand storm.
"Frameworks" tend to fall into two categories, being opinionated or being agnostic. Some folks though, look at things like sugardough as a bootstrap to get the basics in place without much effort. If we are not opinionated, a good thing, we should still give people some guidance?
So, if we do not want to hitch our wagon to anything specific, perhaps we can at least give people some options? Perhaps with some boilerplate code and have them decide?
It's an interesting problem indeed. And I'm not an expert to tell.
Arguably, sugardough isn't a bootstrap. Pure django already has a bootstrap. What sugardough is is a collection of "best practices" according to a sub-group of people, i.e. us.
My fear is that if we put together something like sugardough but for webpack, we, at this point in time, would just build a bootstrap that works but just work.
Should we include django-pipeline for asset packaging?
If yes note: https://github.com/mozilla/sugardough/pull/69#discussion_r30132485