• Robert Knight's avatar
    Move `jsonConfigsFrom` function from `src/shared` to `src/boot` · a50898b3
    Robert Knight authored
    Code in the `boot/` module needs to be compiled to work in older
    browsers than code shared between the annotator and sidebar applications
    in `src/shared`. To ensure this it helps to avoid dependencies from
    code in `src/boot` on code in `src/shared`, but the converse is OK.
    
    This commit moves the `jsonConfigsFrom` function from `shared/settings`
    to `boot/parse-json-config` so that it is compiled with the same
    settings as the rest of the code in the `boot/` module and to reduce the
    chances of someone accidentally introducing ES6+ features into this code
    in future and forgetting about older browsers.
    
    The function was also renamed to make it more obvious that it parses
    JSON config, and thus may fail, rather than returning a JSON string.
    a50898b3
parse-json-config-test.js 4.48 KB