? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
23 Aug 2021

Pull Request for Issue #35198 .

Summary of Changes

With #35198 we introduced a registry for all the folders of the media folder. This PR just automates the creation/update of that registry.

Testing Instructions

This PR needs npm

  • modify the build/build.js so that line 157 to line 171 are muted eg:
// Prepare the repo for dev work
if (Program.prepare) {
    const bench = new Timer('Build');
    allowedVersion();
    recreateMediaFolder(options)
    // .then(() => cleanVendors())
    // .then(() => localisePackages(options))
    // .then(() => Promise.all(
    //   [
    //     patchPackages(options),
    //     minifyVendor(),
    //     createErrorPages(options),
    //     stylesheets(options, Program.args[0]),
    //     scripts(options, Program.args[0]),
    //     bootstrapJs(),
    //     mediaManager(true)
    //   ]))
    // .then(() => bench.stop('Build'))
    // .then(() => { process.exit(0); })
    .catch((err) => {
      // eslint-disable-next-line no-console
      console.error(err);
      process.exit(-1);
    });
}

and also mute line 73 of build/build-modules-js/init/recreate-media.es6.js // await copy(join(RootPath, 'build/media_source'), join(RootPath, 'media'), { filter: filterFunc });

  • Run node ./build/build.js --prepare
  • Check that all the existing folders in the media are empty and any non-core Joomla extensions are unaffected

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

@richard67 this is the missing part you were asking at #35198

@wilsonge @HLeithner this one actually needs to run with a GitHub action on every merge, let me know if you want me to add the action here or is something for you...

avatar dgrammatiko dgrammatiko - open - 23 Aug 2021
avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2021
Category JavaScript Repository
avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
Labels Added: ?
avatar wilsonge
wilsonge - comment - 23 Aug 2021

Is there a reason we put this as a config setting rather than just generating this list of directories at run time?

avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2021

Is there a reason we put this as a config setting rather than just generating this list of directories at run time?

That will work also. I'm tweaking the code to do that... (hopefully, I won't recall some weird edge case that the registry is needed)

avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2021
avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2021

@wilsonge updated

avatar wilsonge
wilsonge - comment - 23 Aug 2021

@dgrammatiko i think you didn't push :)

avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2021
avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2021

@dgrammatiko i think you didn't push :)

Don't you love Github's PWA? It's a caching thing, try hard reload to see the commit...

avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2021
Category JavaScript Repository JavaScript Repository NPM Change
3aca676 23 Aug 2021 avatar dgrammatiko DRY
bef182a 23 Aug 2021 avatar dgrammatiko CS
avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
Labels Added: ? NPM Resource Changed
Removed: ?
avatar HLeithner
HLeithner - comment - 23 Aug 2021

do we really need this after each merge?

avatar dgrammatiko
dgrammatiko - comment - 23 Aug 2021

do we really need this after each merge?

No, not anymore the code is auto-generating the list at runtime. Sorry, I forgot to remove the comment above...

avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2021
avatar dgrammatiko dgrammatiko - change - 23 Aug 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 23 Aug 2021
avatar dgrammatiko dgrammatiko - change - 27 Aug 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 27 Aug 2021
avatar dgrammatiko dgrammatiko - change - 27 Aug 2021
Title
[4] Automation for #35198
[4] Automating the rmrf on the startup of the (npm) build tools
avatar dgrammatiko dgrammatiko - edited - 27 Aug 2021
avatar dgrammatiko
dgrammatiko - comment - 10 Sep 2021

@wilsonge reminder that this one needs to be merged at some point. Thanks

avatar dgrammatiko
dgrammatiko - comment - 6 Nov 2021

@wilsonge friendly reminder for this one

avatar laoneo
laoneo - comment - 10 Jan 2022

I have tested this item successfully on fe62137


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35322.

avatar laoneo laoneo - test_item - 10 Jan 2022 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 28 Jan 2022

@richard67 could you test this one?

avatar richard67
richard67 - comment - 28 Jan 2022

@richard67 could you test this one?

@dgrammatiko Not before late tonight or tomorrow, not sure yet when.

avatar richard67
richard67 - comment - 28 Jan 2022

@bembelimen Maybe this one should be rebased to 4.1-dev, too? If that works cleanly we could maybe still count the one human test which is has right now.

avatar dgrammatiko dgrammatiko - change - 28 Jan 2022
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 28 Jan 2022

Maybe this one should be rebased to 4.1-dev, too?

I did it through the GitHub UI and I guess it worked

avatar dgrammatiko dgrammatiko - change - 28 Jan 2022
Title
[4] Automating the rmrf on the startup of the (npm) build tools
[4.1] Automating the rmrf on the startup of the (npm) build tools
avatar dgrammatiko dgrammatiko - edited - 28 Jan 2022
avatar wilsonge wilsonge - change - 28 Jan 2022
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-28 13:25:37
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 28 Jan 2022
avatar wilsonge wilsonge - merge - 28 Jan 2022
avatar wilsonge
wilsonge - comment - 28 Jan 2022

LGTM. Thanks!

avatar dgrammatiko
dgrammatiko - comment - 28 Jan 2022

Thanks George!

avatar richard67
richard67 - comment - 28 Jan 2022

Thanks for saving me time for testing ? .

Add a Comment

Login with GitHub to post a comment