@mappable-world/mappable-default-ui-theme
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-beta.2 • Public • Published

@mappable-world/mappable-default-ui-theme package


Mappable JS API package

npm version npm Build Status

How use

The package is located in the dist folder:

  • dist/types TypeScript types
  • dist/esm es6 modules for direct connection in your project
  • dist/index.js Mappable JS Module

Recommended use MMapButtonExample as usual npm package:

npm i @mappable-world/mappable-default-ui-theme

and dynamic import

await mappable.ready;

// ...

const {MMapButtonExample} = await import('@mappable-world/mappable-default-ui-theme');

// ...

map.addChild(new MMapButtonExample(props));

Usage without npm

You can use CDN with module loading handler in JS API on your page.

Just use mappable.import:

const pkg = await mappable.import('@mappable-world/mappable-default-ui-theme');

By default mappable.import can load self modules. If you want also load your package, should add loader:

// Add loader at start loaders array
mappable.import.loaders.unshift(async (pkg) => {
    // Process only your package
    if (!pkg.includes('@mappable-world/mappable-default-ui-theme')) return;

    // Load script directly. You can use another CDN
    await mappable.import.script(`https://unpkg.com/${pkg}/dist/index.js`);

    // Return result object
    return window['@mappable-world/mappable-default-ui-theme'];
});

Readme

Keywords

none

Package Sidebar

Install

npm i @mappable-world/mappable-default-ui-theme

Weekly Downloads

3

Version

0.0.1-beta.2

License

Apache-2

Unpacked Size

483 kB

Total Files

205

Last publish

Collaborators

  • mappable-dev