Bug 32975 - Error in package.json's definition of css:build vs css:build:prod
Summary: Error in package.json's definition of css:build vs css:build:prod
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 32609
Blocks: 32978 32994
  Show dependency treegraph
 
Reported: 2023-02-15 18:17 UTC by Owen Leonard
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00, 22.11.04


Attachments
Bug 32975: Error in package.json's definition of css:build vs css:build:prod (1.50 KB, patch)
2023-02-15 20:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32975: Error in package.json's definition of css:build vs css:build:prod (1.54 KB, patch)
2023-02-15 20:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 32975: Error in package.json's definition of css:build vs css:build:prod (1.62 KB, patch)
2023-02-16 07:36 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-02-15 18:17:33 UTC
package.json defines these commands:

    "css:build": "gulp css && gulp css --view opac",
    "css:build:prod": "gulp build && gulp css --view opac",

The second one, css:build:prod is not running the "build" process for the OPAC. It should say "gulp build --view opac"
Comment 1 Owen Leonard 2023-02-15 20:00:08 UTC
Created attachment 146700 [details] [review]
Bug 32975: Error in package.json's definition of css:build vs css:build:prod

The "css:build" command runs "gulp css && gulp css --view opac",
processes that build CSS in a development context.

The "css:build:prod" currently runs "gulp build && gulp css --view
opac", which runs the production-oriented command "gulp build" (for the
staff interface), but runs "gulp css --view opac" which is the same
devel-environment command as above.

It should be "gulp build && gulp build --view opac"

To test, apply the patch and run the two commands and check these two
files to confirm the difference:

koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/opac-tmpl/bootstra/css/opac.css

"yarn css:build" should create unminimized versions of those files.
"yarn css:build:prod" should create minimized versions.
Comment 2 David Nind 2023-02-15 20:51:19 UTC
Created attachment 146701 [details] [review]
Bug 32975: Error in package.json's definition of css:build vs css:build:prod

The "css:build" command runs "gulp css && gulp css --view opac",
processes that build CSS in a development context.

The "css:build:prod" currently runs "gulp build && gulp css --view
opac", which runs the production-oriented command "gulp build" (for the
staff interface), but runs "gulp css --view opac" which is the same
devel-environment command as above.

It should be "gulp build && gulp build --view opac"

To test, apply the patch and run the two commands and check these two
files to confirm the difference:

koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/opac-tmpl/bootstra/css/opac.css

"yarn css:build" should create unminimized versions of those files.
"yarn css:build:prod" should create minimized versions.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2023-02-16 07:36:11 UTC
Created attachment 146710 [details] [review]
Bug 32975: Error in package.json's definition of css:build vs css:build:prod

The "css:build" command runs "gulp css && gulp css --view opac",
processes that build CSS in a development context.

The "css:build:prod" currently runs "gulp build && gulp css --view
opac", which runs the production-oriented command "gulp build" (for the
staff interface), but runs "gulp css --view opac" which is the same
devel-environment command as above.

It should be "gulp build && gulp build --view opac"

To test, apply the patch and run the two commands and check these two
files to confirm the difference:

koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/opac-tmpl/bootstra/css/opac.css

"yarn css:build" should create unminimized versions of those files.
"yarn css:build:prod" should create minimized versions.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2023-02-16 07:36:38 UTC
Sorry about that, Owen. Thanks!
Comment 5 Tomás Cohen Arazi 2023-02-16 15:02:21 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Mason James 2023-02-22 02:26:44 UTC
(In reply to Tomás Cohen Arazi from comment #5)
> Pushed to master for 23.05.

this looks to be missing from master, can you push?
Comment 7 Mason James 2023-02-22 02:55:09 UTC
(In reply to Mason James from comment #6)
> (In reply to Tomás Cohen Arazi from comment #5)
> > Pushed to master for 23.05.
> 
> this looks to be missing from master, can you push?

oops ignore, now i see it

bc43c6e7fe Bug 32975: Error in package.json's definition of css:build vs css:bui      ld:prod
Comment 8 Martin Renvoize 2023-02-24 07:54:20 UTC
Dependency not in 22.11.x series.. no backport required.
Comment 9 Martin Renvoize 2023-03-10 12:29:09 UTC
We decided to backport the dependancy here and thus have now also backported this for 22.11.04 release
Comment 10 Caroline Cyr La Rose 2023-05-11 21:01:19 UTC
This seems to be backend stuff, nothing to be added to the manual. I will close, but feel free to add details as to what needs to be documented, and I will add it to the manual.