Re: Web Assets/JavaScript guideline drafts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 11, 2013 at 1:16 AM, Remi Collet <Fedora@xxxxxxxxxxxxxxxxx> wrote:
> /usr/share/assets => /assets
> /usr/share/javascript => /assets/javascript
>
> This seems a bit ugly...

I'd be perfectly happy with /usr/share/javascript => /javascript if
that's what others want.  I tried to keep everything to one directory
just to make things simpler.

/usr/share/javascript is kept separate to reinforce that it is
altogether a different (though related) beast.  Plus it didn't really
make sense to me to reference a directory for static web content in
server-side applications.

> Could web server configuration be included in web-assets package ?

Perhaps, if that's what the httpd maintainers would prefer.  I really
don't want JS library packages to drag in httpd though, since they can
be used by Ruby and Node.js too, so this would have to be done
carefully.

> Have you a proposal for the change required in the web server package ?

Just something like:
Alias /assets /usr/share/assets

And maybe "Options -Indexes" for this directory if that's desirable
for security?

> (for ex, I don't think lighttpd enable alias by default and afaik global
> alias are not managed by nginx)

At the moment we don't really support the other http daemons very well
anyway, so it's fine if they're left out for now.

> While I mostly agree on "it must be compiled or minified as part of the
> RPM build process", I think we're going to enter nightmare.
>
> Minify is often done with non-open source stuff (such as jsmin).
> But build is not only minify, could requires more complex stuff (merging
> various sources).
>
> Some use a Rakefile but requires some very old gem (prockets iirc).

I know it's painful, but there are good reasons behind it.  I wrote in
an exception to allow the use non-upstream approved minifiers if
necessary, to make this slightly less painful.

This has been part of all previous JS drafts that I'm aware of and
packages like jquery have been blocked for years on this point, so I'm
hesitant to remove it without a strong indication from some FPC
members that they would be okay with it.

> About /assets/javascript/foo URI.
>
> Sometime using an app specific alias is a simpler solution, especially
> when the html is generated, patching the source could be not so simple.
>
> Ex horde : http://localhost/horde will use
> http://localhost/horde/js/ckeditor, so a trivial solution is
>
> Alias /horde/js/ckeditor          /usr/share/ckeditor

That's still totally okay, it would just be:
Alias /horde/js/ckeditor /usr/share/javascript/ckeditor

I expect a lot of apps will want to do this so they don't need
patches, but others allow this to be configurable so it isn't
necessary.

I added some language to both drafts explicitly permitting this:
https://fedoraproject.org/w/index.php?title=User%3APatches%2FPackagingDrafts%2FWeb_Assets&diff=344634&oldid=344600
https://fedoraproject.org/w/index.php?title=User%3APatches%2FPackagingDrafts%2FJavaScript&diff=344635&oldid=344581

-T.C.
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging





[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux