-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.7
-
1
-
Team Hedgehog 2023 Sprint 2.1
This is an obscure bug, but annoying if you are hit by it
If you have the word "src" within the path to your Moodle install ($CFG->dirroot, e.g. mine is /opt/moodle/master/src) then building all Javascript module with grunt actually created a "build" directory one level up from dirroot, rather than within it as expected
$ git diff
|
diff --git a/reportbuilder/amd/src/audience.js b/reportbuilder/amd/src/audience.js
|
index b5392d8c2f..1fd1d9f6ab 100644
|
--- a/reportbuilder/amd/src/audience.js
|
+++ b/reportbuilder/amd/src/audience.js
|
@@ -46,7 +46,7 @@ let contextId = 0;
|
* @param {String} title
|
*/
|
const addAudienceCard = (className, title) => {
|
- const pendingPromise = new Pending('core_reportbuilder/audience:add');
|
+ const pendingPromise = new Pending('core_reportbuilder/audience:addXX');
|
|
const audiencesContainer = document.querySelector(reportSelectors.regions.audiencesContainer);
|
const audienceCardLength = audiencesContainer.querySelectorAll(reportSelectors.regions.audienceCard).length;
|
$ ./node_modules/.bin/grunt amd
|
Running "ignorefiles" task
|
|
Running "eslint:amd" (eslint) task
|
Browserslist: caniuse-lite is outdated. Please run:
|
npx browserslist@latest --update-db
|
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
|
|
Running "rollup:dist" (rollup) task
|
|
Done.
|
$ git diff
|
diff --git a/reportbuilder/amd/src/audience.js b/reportbuilder/amd/src/audience.js
|
index b5392d8c2f..1fd1d9f6ab 100644
|
--- a/reportbuilder/amd/src/audience.js
|
+++ b/reportbuilder/amd/src/audience.js
|
@@ -46,7 +46,7 @@ let contextId = 0;
|
* @param {String} title
|
*/
|
const addAudienceCard = (className, title) => {
|
- const pendingPromise = new Pending('core_reportbuilder/audience:add');
|
+ const pendingPromise = new Pending('core_reportbuilder/audience:addXX');
|
|
const audiencesContainer = document.querySelector(reportSelectors.regions.audiencesContainer);
|
const audienceCardLength = audiencesContainer.querySelectorAll(reportSelectors.regions.audienceCard).length;
|
$ ls -1 ../build
|
admin
|
availability
|
backup
|
badges
|
blocks
|
calendar
|
comment
|
contentbank
|
course
|
customfield
|
enrol
|
filter
|
grade
|
h5p
|
lib
|
media
|
message
|
mod
|
payment
|
question
|
report
|
reportbuilder
|
search
|
theme
|
user
|
Note that running grunt with --root=<relativepath> is not affected, it's only when building everything
- caused a regression
-
MDL-78400 Building JS modules with Grunt places build files in src folder on Windows
- Closed