must we include the source files for all minified JavaScript?

97 views
Skip to first unread message

Tim Graham

unread,
Apr 6, 2016, 12:58:50 PM4/6/16
to Django developers (Contributions to Django itself)

From a Trac ticket [0]:


In Debian, we like to have the sources of everything that we ship and we consider that minified javascript files are not really scripts (which are their own source).

There are currently two problematic files in Django:


js_tests/qunit/blanket.min.js
django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.min.js


To remedy this I would suggest to either:

  • directly use a non-minified file like you do for many other javascript files (ex: django/contrib/admin/static/admin/js/SelectFilter2.js)
  • store a non-minified file next to the minified file (same name without the ".min" part)
[0] https://code.djangoproject.com/ticket/26474

Carl Meyer

unread,
Apr 6, 2016, 1:13:27 PM4/6/16
to django-d...@googlegroups.com
It seems like a reasonable request to me. It's just generally useful to
have the original source matching the minified code available, e.g. for
debugging an issue with that code. In theory you can go find the
corresponding non-minified code yourself, but it's not always easy to
find exactly the right corresponding version, and there's not much
reason to make that work necessary.

Carl

On 04/06/2016 10:58 AM, Tim Graham wrote:
> From a Trac ticket [0]:
>
>
> In Debian, we like to have the sources of everything that we ship and we
> consider that minified javascript files are not really scripts (which
> are their own source).
>
> There are currently two problematic files in Django:
>
>
> js_tests/qunit/blanket.min.js
> django/contrib/admin/static/admin/js/vendor/xregexp/xregexp.min.js
>
>
> To remedy this I would suggest to either:
>
> * directly use a non-minified file like you do for many other
> javascript files (ex:
> django/contrib/admin/static/admin/js/SelectFilter2.js)
> * store a non-minified file next to the minified file (same name
> without the ".min" part)
>
> [0] https://code.djangoproject.com/ticket/26474
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-develop...@googlegroups.com
> <mailto:django-develop...@googlegroups.com>.
> To post to this group, send email to django-d...@googlegroups.com
> <mailto:django-d...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/acca9df5-2377-4e6c-b103-6167c9e4bd87%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/acca9df5-2377-4e6c-b103-6167c9e4bd87%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

signature.asc
Reply all
Reply to author
Forward
0 new messages