Compare commits

...

2 commits

Author SHA1 Message Date
bec01ed02f 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.
2026-06-11 16:16:42 +00:00
1c92877f48 Clarify self-contradictory pre-generated CSS guideline
See #1496.
The current text of the Guidelines are confusing because in once
paragraph it says CSS must be re-generated and in another it says it
doesn't have to be. This clarifies the text so it is inline with
decision made in https://pagure.io/fesco/issue/3269.
2026-06-11 16:16:42 +00:00
2 changed files with 10 additions and 16 deletions

View file

@ -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,

View file

@ -102,12 +102,10 @@ unless stated otherwise in this document.
Pure CSS frameworks can be included as-is.
CSS frameworks that use an alternative language that compiles to CSS,
such as https://lesscss.org/[LESS],
must compile to CSS as part of the build process.
Packages containing CSS should make the best effort to regenerate any precompiled/minimized CSS wherever possible,
SHOULD compile to CSS as part of the build process,
as this leads to more maintainable packages.
Where this would result in a significant hardship,
the bundled pregenerated CSS may be shipped with a specfile comment explaining the decision.
bundled pregenerated CSS may be shipped with a specfile comment explaining the decision.
This does not eliminate the requirement to validate licenses of bundled content.
== Flash