Fix self-contradictory web assets guidelines #1539
1 changed files with 8 additions and 12 deletions
Clarify JavaScript Compilation/Minification Guidelines
See the previous commit message. The Javascript Guidelines had the same problem, but it required more textual changes to make the document internally consistent while still expressing (what I think is) the intended meaning.
commit
6d63f837cb
|
|
@ -20,12 +20,6 @@ Node.js xref:Node.js.adoc[have their own guidelines],
|
|||
and software like GNOME which embeds JavaScript for extensions
|
||||
have their own directories and policies as well.
|
||||
|
||||
Packages containing JavaScript should make the best effort to regenerate any precompiled/minimized JS wherever possible,
|
||||
as this leads to more maintainable packages.
|
||||
Where this would result in a significant hardship,
|
||||
the bundled pregenerated JS may be shipped with a specfile comment explaining the decision.
|
||||
This does not eliminate the requirement to validate licenses of bundled code.
|
||||
|
||||
== Naming Guidelines
|
||||
|
||||
The name of a JavaScript library package MUST start with
|
||||
|
|
@ -106,17 +100,19 @@ or to eliminate needless deviation from upstream.
|
|||
== Compilation/Minification
|
||||
|
||||
If a JavaScript library typically is shipped as minified or compiled code,
|
||||
it MUST be compiled or minified as part of the RPM build process.
|
||||
Shipping pre-minified or pre-compiled code is unacceptable in Fedora.
|
||||
it SHOULD be compiled or minified as part of the RPM build process,
|
||||
as this leads to more maintainable packages.
|
||||
Where this would result in a significant hardship,
|
||||
the bundled pregenerated JS may be shipped with a specfile comment explaining the decision.
|
||||
This does not eliminate the requirement to validate licenses of bundled code.
|
||||
|
||||
The compiler or minifier used by upstream
|
||||
should be used to compile or minify the code.
|
||||
When regenerating bundled JS, the same compiler or minifier used by upstream
|
||||
should be used to compile or minify the code during the RPM build process.
|
||||
If the minifier used by upstream is unable to be included in Fedora,
|
||||
an alternative minifier may be used.
|
||||
See https://fedoraproject.org/wiki/JavaScript/Minification_Issues[this page]
|
||||
for a list of known problem areas and suggestions for workarounds.
|
||||
|
||||
Additionally, the uncompiled/unminified version MUST be included
|
||||
Additionally, the uncompiled/unminified version SHOULD be included
|
||||
|
|
||||
alongside the compiled/minified version.
|
||||
|
||||
Minified JavaScript is not useful for JavaScript run locally,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue
I'm gonna note for the record that I do not understand exactly what is being asked for here. Should I ship the full-size JavaScript in the same RPM that ships the minified one? Or just include in the SRPM?
Nevertheless, this rule already existed before and now is just MUST->SHOULD, so my curiosity should not block this PR.