diff --git a/app.js b/app.js index d86aafc0..893d0b0d 100644 --- a/app.js +++ b/app.js @@ -178,11 +178,15 @@ function initModule(mod, file, dir) { if (!script[code]) { return logger.log(`inject missing target "${code}"`); } - let opt = options || {}; + const opt = options || {}; + const path = `${dir}/${file}`; if (opt.end) { - script[code].push(dir + "/" + file); + script[code].push(path); } else { - script[code].splice(0, 0, dir + "/" + file); + script[code].splice(0, 0, path); + } + if (opt.nocache) { + nocache[path] = true; } }, path: { @@ -359,6 +363,9 @@ const script = { ].map(p => `src/${p}.js`) }; +// prevent caching of specified modules +const nocache = {}; + const db = { // -------- key: arr => arr.join("/"), @@ -668,9 +675,10 @@ function concatCode(array) { // in debug mode, the script should load dependent // scripts instead of serving a complete bundle if (debug) { - let code = [ '(function() { let load = [ ' ]; + const code = [ '(function() { let load = [ ' ]; direct.forEach(file => { - code.push(`"/${file.replace(/\\/g,'/')}?${version}",`); + const vers = nocache[file] ? Date.now() : version; + code.push(`"/${file.replace(/\\/g,'/')}?${vers}",`); }); code.push([ ']; function load_next() {', diff --git a/notes.md b/notes.md index 72d7a7fd..eeed012b 100644 --- a/notes.md +++ b/notes.md @@ -1,9 +1,9 @@ # Kiri:Moto todo ## 2.3 remaining -* deprecate cam device origin settings -* gcode render broken when layer hints disabled * cap path ends +* rulers need to follow workspace units +* gcode render broken when layer hints disabled * onshape mouse mapping option ## 2.4