Skip to content

Commit

Permalink
doc: Update example
Browse files Browse the repository at this point in the history
chore(config): Remove UMD build
  • Loading branch information
motss committed Apr 18, 2020
1 parent 5918975 commit 1835a64
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ This module also gets featured in [web-padawan/awesome-lit-html][web-padawan-awe
- [htmlFragment()](#htmlfragment)
- [htmlFragmentSync()](#htmlfragmentsync)
- [SSR with Express (Node.js)](#ssr-with-express-nodejs)
- [Browser](#browser)
- [ES Modules](#es-modules)
- [UMD](#umd)
- [Browser support](#browser-support)
- [API Reference](#api-reference)
- [html()](#html-1)
- [htmlSync()](#htmlsync-1)
Expand Down Expand Up @@ -143,32 +141,16 @@ html`${syncTask}${peopleList}${asyncTask}`;

[![Edit SSR with Express and LitNtml](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/ssr-with-express-and-litntml-4tbv9?fontsize=14)

### Browser
### Browser support

#### ES Modules
Only modern browsers with native ES Modules support requires no polyfills and transpilation needed.

```html
<!doctype html>
<html>
<head>
<script type="module">
import { html } from 'https://unpkg.com/lit-ntml@latest/dist/lit-ntml.min.js?module';
// --snip
</script>
</head>
</html>
```

#### UMD

```html
<!doctype html>
<html>
<head>
<script src="https://unpkg.com/lit-ntml@latest/dist/lit-ntml.umd.min.js"></script>
<script>
var { html } = window.LitNtml;
import { html } from 'https://cdn.jsdelivr.net/npm/lit-ntml@latest/dist/lit-ntml.min.js';
// --snip
</script>
Expand Down
16 changes: 8 additions & 8 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ const multiBuild = [
format: 'cjs',
exports: 'named',
},
{
input: ['src/lit-ntml.ts'],
file: 'dist/lit-ntml.umd.js',
format: 'umd',
name: 'LitNtml',
exports: 'named',
browser: true,
},
// {
// input: ['src/lit-ntml.ts'],
// file: 'dist/lit-ntml.umd.js',
// format: 'umd',
// name: 'LitNtml',
// exports: 'named',
// browser: true,
// },
{
input: ['src/lit-ntml.ts'],
file: 'dist/lit-ntml.js',
Expand Down

0 comments on commit 1835a64

Please sign in to comment.