General developer forum

Minifying JS during Development - Moodle 3.3+

 
Picture of Dave Emsley
Re: Minifying JS during Development - Moodle 3.3+
Particularly helpful Moodlers

OK I've installed Grunt on the server and it is running "grunt watch".

demsley@orangeServer:/home/learndom/public_html/moodle/theme/curlew$ sudo grunt watch
Running "watch" task
Waiting...

...and I've updated the .js file in theme/curlew/amd/src and pushed it to the server and I get:

>> File "theme/curlew/amd/src/startup.js" changed.
Running "eslint:amd" (eslint) task
/home/learndom/public_html/moodle/theme/curlew/amd/src/startup.js
   1:26  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   2:94  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   3:1   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   4:37  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   5:1   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   6:49  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   7:1   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
   8:13  error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style 
......
  16:56  error  Trailing spaces not allowed                      no-trailing-spaces
✖ 49 problems (49 errors, 0 warnings)

49 errors - not bad in 24 line script  wink

Anyway

Many Thanks Davo and Paul



 
Average of ratings: -