When I go into my plugin directory and run `grunt amd --force` to try and build the files, I get tonnes of errors.
Firstly, it seems to do all the installed plugins and themes, not just the actual plugin I'm ideveloping at the moment, though that doesn't matter that much.
Across all the plugins, I get thousands of errors about trailing spaces or, linebreaks being 'CRLF' instead of 'LF', etc... and the "eslint:amd" task then fails.
Then when it gets onto the "uglify:amd" task, I get a specific error in one of my plugins:
Warning: Uglification failed.
SyntaxError: Unexpected token: name (url).
Line 59 in blocks/elbp/amd/src/scripts.js
Which points to this:
let url = ELBP.www + "/blocks/elbp/js/ajaxHandler.php";
I googled the error and on the github it suggests that this uglify does not support ES6 and I'd need to use some other branch of grunt or something. I've just been following the instructions in the Moodle documentation.
Has anyone else come across this in their development? How did you get around it? Do I have to use grunt, or is it just a suggestion?