How to use the @mathigon/boost.script function in @mathigon/boost

To help you get started, we’ve selected a few @mathigon/boost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mathigon / textbooks / content / shared / components / code-editor.js View on Github external
function loadJS(src) {
  if (!PROMISES[src]) PROMISES[src] = script(src);
  return PROMISES[src];
}
github mathigon / textbooks / content / circles / components / d3-geo.js View on Github external
export function loadD3() {
  const load1 = script('/resources/shared/vendor/d3.v4.min.js');
  const load2 = script('/resources/shared/vendor/d3-geo-projection.v2.min.js');
  const load3 = script('/resources/shared/vendor/topojson.v1.min.js');

  return Promise.all([load1, load2, load3])
      .then(() => fetch('/resources/circles/images/world-110m.json'))
      .then(text => text.json())
      .then(world => ({d3, topojson, world}));
}
github mathigon / textbooks / content / circles / components / d3-geo.js View on Github external
export function loadD3() {
  const load1 = script('/resources/shared/vendor/d3.v4.min.js');
  const load2 = script('/resources/shared/vendor/d3-geo-projection.v2.min.js');
  const load3 = script('/resources/shared/vendor/topojson.v1.min.js');

  return Promise.all([load1, load2, load3])
      .then(() => fetch('/resources/circles/images/world-110m.json'))
      .then(text => text.json())
      .then(world => ({d3, topojson, world}));
}
github mathigon / textbooks / content / circles / components / d3-geo.js View on Github external
export function loadD3() {
  const load1 = script('/resources/shared/vendor/d3.v4.min.js');
  const load2 = script('/resources/shared/vendor/d3-geo-projection.v2.min.js');
  const load3 = script('/resources/shared/vendor/topojson.v1.min.js');

  return Promise.all([load1, load2, load3])
      .then(() => fetch('/resources/circles/images/world-110m.json'))
      .then(text => text.json())
      .then(world => ({d3, topojson, world}));
}