Skip to content

Commit

Permalink
Mention CDN usage in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Mar 14, 2024
1 parent 1e52dfa commit a945e14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 13 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -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.***

Expand All @@ -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
<script type="module">
import * as smd from "https://cdn.jsdelivr.net/npm/streaming-markdown/smd.min.js"
// ...
</script>
```

## Usage

First create new markdown `Parser` by calling `parser` function.\
Expand Down
1 change: 0 additions & 1 deletion smd_min_entry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export {
// Token enum
DOCUMENT,
PARAGRAPH,
HEADING_1,
HEADING_2,
Expand Down

0 comments on commit a945e14

Please sign in to comment.