adaptlearning / adapt_framework

A toolkit for creating responsive, accessible, multilanguage HTML5 e-learning courses.
https://www.adaptlearning.org/
GNU General Public License v3.0
569 stars 242 forks source link

New: Added server-diff and --cacheage (fixes 3547) #3548

Closed oliverfoster closed 1 month ago

oliverfoster commented 2 months ago

fixes #3547

Speed up AAT compilation by only compiling when necessary and allowing javascript compilation caches to live for longer.

New

Fixes

Notes

Testing

  1. Setup
    git clone https://github.com/adaptlearning/adapt_framework/ 3547-diff
    cd 3547-diff
    git checkout issue/3547
    adapt devinstall && npm install
    mkdir build/
    cp -r src/course/ build/course/
    grunt server-diff:dev --cacheage=2419200000
  2. Rediff no changes
    grunt server-diff:dev --cacheage=2419200000
  3. Rediff with changes
    grunt server-diff:dev --cacheage=2419200000
  4. Switch from development to production
    grunt server-diff:build --cacheage=2419200000

Caveats

chris-steele commented 2 months ago

Looks slick 👍 @oliverfoster just remind me what was the reason for not using newer: on required files?

oliverfoster commented 2 months ago

Looks slick 👍 @oliverfoster just remind me what was the reason for not using newer: on required files?

Ensuring that the @@ string replacement directives for the replace task work properly every time. Replace can only function on freshly copied original files where the directives haven't yet been replaced.

Like: https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/required/index.html#L2

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 5.39.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: