Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80762

Consider future of Grunt and Moodle CLI tooling

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.4
    • JavaScript
    • None
    • MOODLE_404_STABLE

      We introduced Grunt a number of years ago (2015) as a task runner to consolidate a number of other tools (shifter, jslint/eslint, style lint, etc.)

      Grunt was chosen, in part, because it was a very popular build tool at the time.

      A lot of time has passed and we need to consider whether it's still fit for our purposes. The landscape of JS build tooling has changed substantially since then.

      As the wider web community has generally adopted build tools, I still feel that they are not suited to us. Tools such as webpack, rollup, vite, esbuild, and others, are really good at what they do, but typically what they do is take a lot of inputs, and compile them into a single output. That just isn't suitable for Moodle where we do not require JS on production sites, and have no way of building on them, and we really don't want to encourage building on prod.

      Moodle currently needs to ship pre-built JS, and to make it easy for our community to build their sites too, without having to spend heaps of time writing their own tooling.

      As a result, the landscape for build tools is somewhat bleak:

      • Grunt - last release > 12 months ago. Support for ESM seems limited
      • GulpJS - seems abandoned. Last commit 2 years ago, last release in 2019
      • Brunch.io - abandoned
      • Jake.js - Last release ~ 8 month sago. Low traffic and low usage

      Unfortunately it is becoming harder to update some tooling because Grunt does not support ESM easily (or at all – hard to tell) and some packages are moving away from CommonJS entirely.

      Another option is create our own tooling, which isn't too difficult in the grand scheme of things.

      In any case, this is something we need to consider sooner rather than later as it poses a risk to the sustainability of our current tooling.

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.