NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
21 Jun 2021

Pull Request for Issue #34590.

Summary of Changes

  • Restores the watch functionality
  • Allows the --watch to watch a specific folder
  • Implement the scss/css part

Testing Instructions

Com Media
  • At you cmd run npm run watch:com_media
  • then edit administrator/components/com_media/resources/scripts/components/breadcrumb/breadcrumb.vue
  • Check both media/com_media/js/media-manager.js and media/com_media/js/media-manager.min.js that the mofified time was few seconds before and the content in both files is unmanggled JS
ES6, WebComponents, ES5
  • run npm run watch -- build/media_source/templates/administrator
  • Edit and save the file build/media_source/templates/administrator/atum/js/template.es6.js
  • observe the modification time in the media/templates/administrator/atum/js/template... files
SCSS, CSS
  • run npm run watch -- build/media_source/plg_system_webauthn
  • Edit and save the file build/media_source/plg_system_webauthn/scss/button.scss
  • observe the modification time in the media_source/plg_system_webauthn/scss/button... files

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

Yes, updated

There is one case that the watcher is not handling atm: if the source file gets deleted the compiled files are not removed as well.

@laoneo let me know if this is ok

avatar dgrammatiko dgrammatiko - open - 21 Jun 2021
avatar dgrammatiko dgrammatiko - change - 21 Jun 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jun 2021
Category JavaScript Repository NPM Change
fcdb5ab 21 Jun 2021 avatar dgrammatiko CS
avatar dgrammatiko dgrammatiko - change - 21 Jun 2021
Labels Added: NPM Resource Changed ?
avatar dgrammatiko dgrammatiko - change - 21 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 21 Jun 2021
avatar dgrammatiko dgrammatiko - change - 21 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 21 Jun 2021
a710a5d 21 Jun 2021 avatar dgrammatiko CS
avatar dgrammatiko dgrammatiko - change - 21 Jun 2021
Title
[4.0] Restore watch for com_media
[4.0] Build tools: watch functionality revised
avatar dgrammatiko dgrammatiko - edited - 21 Jun 2021
cd314f2 21 Jun 2021 avatar dgrammatiko DRY
avatar dgrammatiko dgrammatiko - change - 21 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 21 Jun 2021
avatar laoneo
laoneo - comment - 22 Jun 2021

Let me know when I can test this?

avatar dgrammatiko
dgrammatiko - comment - 22 Jun 2021

@laoneo it's ready

avatar laoneo
laoneo - comment - 22 Jun 2021

It works, but there is no feedback that a file is compiled. Is this something can be done easily? If not I will mark the test as success.

avatar dgrammatiko
dgrammatiko - comment - 22 Jun 2021

@laoneo feedback added, should look like:
Screenshot 2021-06-22 at 14 33 06

avatar laoneo
laoneo - comment - 22 Jun 2021

Would also be nice if it gets printed because of which vue file the it was built. But fine for me now.

avatar dgrammatiko
dgrammatiko - comment - 22 Jun 2021

Would also be nice if it gets printed because of which vue file the it was built

This one needs a bit more research as the rollup docs don't mention anything helpful for getting the file that triggers the bundling. I guess there's a way to get it from chokidar which is the npm package used for the watch functionality from rollup...

avatar wilsonge wilsonge - change - 22 Jun 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-06-22 13:37:15
Closed_By wilsonge
avatar wilsonge wilsonge - close - 22 Jun 2021
avatar wilsonge wilsonge - merge - 22 Jun 2021
avatar wilsonge
wilsonge - comment - 22 Jun 2021

Thanks both!

Add a Comment

Login with GitHub to post a comment