const mixinafDuvet::DuvetConfigIds
afDuvet::DuvetConfigIds
IoC Config values for Duvet.
- baseModuleUrl
- const static Str baseModuleUrl := "afDuvet.baseModuleUrl"- The base URL (local to BedSheet) where RequireJS / AMD modules are loaded from. It should be mapped by BedSheet's - FileHandlerservice as this is where you save your Javascript modules.- Override this URL should it conflict with an existing BedSheet Route. - Defaults to - `/modules/`.
- disableSmartInsertion
- const static Str disableSmartInsertion := "afDuvet.disableSmartInsertion"- By default, Duvet will try to insert RequireJS and other script tags before the last - <script>tag in the HTML. This allows you to write your own- require()script functions at the bottom of the HTML page and still have access to RequireJS. (Which is handy for quick wins in development).- But inevitably this smart insertion will fail at some point, especially if the script contains the character sequence - </script>in a comment or similar; it is, after all, just regular expression matching.- So setting this config to - truedisables the (ahem) smart insertion and bangs in all scripts just before the closing- </body>tag.
- requireJsFile
- const static Str requireJsFile := "afDuvet.requireJsFile"
- requireJsTimeout
- const static Str requireJsTimeout := "afDuvet.requireJsTimeout"- How long RequireJs waits before giving up on loading a script. Setting it to - 0or- nulldisables the timeout. Equates to the waitSeconds config option.- Defaults to - 15sec.
- requireJsUrl
- const static Str requireJsUrl := "afDuvet.requireJsUrl"- The URL that the RequireJS library will be served under. Override it should it conflict with an existing BedSheet Route. - Defaults to - `/scripts/require-2.3.5.js`.
- tzJsUrl
- const static Str tzJsUrl := "afDuvet.tzJsUrl"- The URL that the TimeZone database will be served under. Override it should it conflict with an existing BedSheet Route. - Defaults to - `/scripts/tz.js`.
- updateCspHeader
- const static Str updateCspHeader := "afDuvet.updateCspHeader"- When injecting scripts and stylesheets, Duvet will automatically update any - Content-Security-Policyheader directives to allow the script to load / run. As this may not always be desired, set to- falseto disable.