These code changes introduce improvements to the Tutor MFE (Micro-Frontend) plugin by adding automation and efficiency for managing and running tasks in environments where MFEs are mounted. When MFEs are mounted, it will run npm clean-install as part of the run tutor dev launch. The "mfe" init task npm-install.sh is taking care of installing the node_modules, as it is done in the LMS
Test Cases:
[x] The job should run for all mounted MFEs
[ ] The job will run only in tutor dev, not tutor local, as MFEs mount only in tutor dev environment.
[x] If no node_modules are present, it should install node_modules.
[x] If the node_modules directory exists but is empty or outdated, it should install node_modules.
[x] If the package-lock.json file changes slightly, it should trigger reinstallation of node_modules.
[x] If node_modules are installed and then reinstallation is attempted without changes to package-lock.json, it should not reinstall node_modules.
Closes #218
Special thanks to @Danyal-Faheem for collaborating with me on this and helping to reach a solution. 🙌
WIP -> The jobs run on tutor dev only
Description
These code changes introduce improvements to the Tutor MFE (Micro-Frontend) plugin by adding automation and efficiency for managing and running tasks in environments where MFEs are mounted. When MFEs are mounted, it will run
npm clean-install
as part of the runtutor dev launch
. The "mfe" init tasknpm-install.sh
is taking care of installing the node_modules, as it is done in the LMSTest Cases:
tutor dev
, nottutor local
, as MFEs mount only intutor dev
environment.node_modules
are present, it should installnode_modules
.node_modules
directory exists but is empty or outdated, it should installnode_modules
.package-lock.json
file changes slightly, it should trigger reinstallation ofnode_modules
.node_modules
are installed and then reinstallation is attempted without changes topackage-lock.json
, it should not reinstallnode_modules
.Closes #218
Special thanks to @Danyal-Faheem for collaborating with me on this and helping to reach a solution. 🙌