1.2.2 • Published 1 month ago
@startinblox/cqcm-map v1.2.2
CQCM Map
Getting started
Use in production
For production usage, map is served via a CDN like JSDelivr or self-hosted.
<script type="module" src="https://cdn.jsdelivr.net/npm/@startinblox/core@latest/dist/index.js" defer=""></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@startinblox/cqcm-map@latest" defer=""></script>
<!-- ... -->
<solid-cqcm-map data-src="https://your-proxy-server/your-map-endpoint"></solid-cqcm-map>
Development environment
To set up the local development environment with Storybook:
npm install
npm run storybook
Development workflow
Localization
This project utilizes @lit/localize
for internationalization.
To change the locale at runtime within an application:
window.setLocale.map((setLocale) => setLocale("your-lang-code"));
To retrieve the current locale:
window.getLocale.map((locale) => console.log(locale));
Testing
# Run all tests
npm run cy:run
# Open Cypress's interface
npm run cy:open
Building for production
# Generate localization files
npm run locale:build
# Generate Storybook documentation
npm run build-storybook
# Build the component repository
npm run build