From 9225e5c81d8b631d4af087a7e3f502cce916d5f2 Mon Sep 17 00:00:00 2001 From: Alexander Shabunevich Date: Fri, 16 Dec 2022 17:32:47 +0300 Subject: [PATCH] Update docs about import maps using --- docs/README.md | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index 289c7cb..b210781 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ - + --- @@ -23,17 +23,44 @@ This demo is interactive: feel free to edit the examples. npm i maska ``` -## **From CDN** +## **CDN / Global build** -To include library from CDN, use UMD format and prefix all classes and directives with `Maska.` +You can use **Maska** directly from CDN with simple script tag. +Library API will be exposed on the global `Maska` object: ``` html ``` + +## **CDN / ES modules** + +For modern browsers you can use ES modules build with (optional) [import maps](https://caniuse.com/import-maps): + +``` html + + +``` + +Notice that we are using `