From a945e140f46a85fe186f17acf3e207e6bbcc3c1a Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Thu, 14 Mar 2024 13:29:24 +0100 Subject: [PATCH] Mention CDN usage in the readme --- readme.md | 14 +++++++++++++- smd_min_entry.js | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 5d375a5..15150f8 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # Streaming *Markdown* -[![version](https://img.shields.io/npm/v/streaming-markdown?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/streaming-markdown) [![github](https://img.shields.io/badge/GitHub-streaming--markdown-orange?style=for-the-badge&logo=github)](https://github.com/thetarnav/streaming-markdown) +[![version](https://img.shields.io/npm/v/streaming-markdown?logo=npm)](https://www.npmjs.com/package/streaming-markdown) [![github](https://img.shields.io/badge/GitHub-streaming--markdown-orange?logo=github)](https://github.com/thetarnav/streaming-markdown) **Experiment making a streaming makdown parser *à la ChatGPT.*** @@ -16,6 +16,18 @@ npm install streaming-markdown *Or just copy [**`smd.js`**](https://github.com/thetarnav/streaming-markdown/blob/main/smd.js) file to your project.* +Or use the [CDN link](https://www.jsdelivr.com/package/npm/streaming-markdown).\ +It's a minified *(3kB Gzip)* version of the package, with only the necessary functions exported.\ +See the exports in [`smd_min_entry.js`](https://github.com/thetarnav/streaming-markdown/blob/main/smd_min_entry.js).\ +The package uses ES module exports, so you need to use `type="module"` in your script tag. + +```html + +``` + ## Usage First create new markdown `Parser` by calling `parser` function.\ diff --git a/smd_min_entry.js b/smd_min_entry.js index 42b66a4..b239f56 100644 --- a/smd_min_entry.js +++ b/smd_min_entry.js @@ -1,6 +1,5 @@ export { // Token enum - DOCUMENT, PARAGRAPH, HEADING_1, HEADING_2,