m7-js-lib is distributed as source ES modules in this repository, with optional versioned dist/ bundles you can generate locally.
Import directly from src:
import lib, { init } from "../../src/index.js";
init();or:
import lib from "../../src/auto.js";Build both bundle sets from repo root:
npm run buildThis emits:
dist/nomap/m7.bundle.v<version>.min.jsdist/nomap/m7.auto.bundle.v<version>.min.jsdist/map/m7.bundle.v<version>.min.jsdist/map/m7.bundle.v<version>.min.js.mapdist/map/m7.auto.bundle.v<version>.min.jsdist/map/m7.auto.bundle.v<version>.min.js.map
Use the explicit-lifecycle bundle when you want side-effect-free import:
import lib, { init } from "../../dist/nomap/m7.bundle.v1.0.0.min.js";
init();Use the auto-bootstrap bundle when you want import-time initialization:
import lib from "../../dist/nomap/m7.auto.bundle.v1.0.0.min.js";- Preserve ESM module semantics.
- Avoid bundling duplicate copies of the library where singleton identity matters.
- Choose one entrypoint strategy (
index.jsexplicit init, orauto.jsauto-init) per integration boundary. npm run buildemits bothdist/nomapanddist/map.
No third-party package dependency is required for core operation.
DOM-dependent helpers require browser DOM APIs.