I am loading (via requirejs) (the latest versions of) dust and dust-helpers in the following way
define.amd.dust = true;
require(["./Scripts/dust-full"], function (dust) {
require(["./Scripts/dust-helpers"], function () {
... //my other dust custom helpers
});
});
All works well - I am able to utilise the dust/dust-helper logic. But now I would like to leverage the dust-motes if helper and have tried the following
define.amd.dust = true;
require(["./Scripts/dust-full"], function (dust) {
require(["./Scripts/dust-helpers"], function () {
require(["./Scripts/dustmotes-if"], function () {
... //my other dust custom helpers
});
});
});
- however - it gets to the "require(["./Scripts/dustmotes-if"], function () {" line and skips to the end (the closing curly brace) without going inside to execute "my other dust custom helpers". Note I have checked the file path to be OK.
I've also tried removing the "require(["./Scripts/dustmotes-if"], function () {" logic and replacing with simply "require(["./Scripts/dustmotes-if"]);" - although the code executes, the 'if' helper is not loaded into the helpers collection and hence referencing the 'if' helper in the dust code results in "Helper 'if' does not exist".
Has anyone tried this or have any ideas. The reference at http://www.dustjs.com/ doesn't really cover the above scenario - as well, much of the documentation/forum-posts online refer to old versions of dustjs and requirejs