Import upstream changes (da9db86a33cba710d439e254df2492f9f6dcbbee)

This commit is contained in:
Lit Robot
2022-05-18 23:42:38 +00:00
parent 595fe63ef0
commit ad1a384afd
6 changed files with 21121 additions and 30884 deletions

2
.gitignore vendored
View File

@@ -7,3 +7,5 @@ my-element.js
my-element.js.map my-element.js.map
my-element.d.ts my-element.d.ts
my-element.d.ts.map my-element.d.ts.map
# only generated for size check
my-element.bundled.js

View File

@@ -35,8 +35,7 @@ Both the TypeScript compiler and lit-analyzer are configured to be very strict.
## Testing ## Testing
This sample uses modern-web.dev's This sample uses modern-web.dev's
[@web/test-runner](https://www.npmjs.com/package/@web/test-runner) along with [@web/test-runner](https://www.npmjs.com/package/@web/test-runner) for testing. See the
Mocha, Chai, and some related helpers for testing. See the
[modern-web.dev testing documentation](https://modern-web.dev/docs/test-runner/overview) for [modern-web.dev testing documentation](https://modern-web.dev/docs/test-runner/overview) for
more information. more information.

View File

@@ -34,7 +34,7 @@
<pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> i my-element</code></pre> <pre class="language-bash"><code class="language-bash"><span class="token function">npm</span> i my-element</code></pre>
<h2>CDN</h2> <h2>CDN</h2>
<p>npm CDNs like <a href="">unpkg.com</a> can directly serve files that have been published to npm. This works great for standard JavaScript modules that the browser can load natively.</p> <p>npm CDNs like <a href="">unpkg.com</a> can directly serve files that have been published to npm. This works great for standard JavaScript modules that the browser can load natively.</p>
<p>For this element to work from unpkg.com specifically, you need to include the <code>?module</code> query parameter, which tells unpkg.com to rewrite &quot;bare&quot; module specificers to full URLs.</p> <p>For this element to work from unpkg.com specifically, you need to include the <code>?module</code> query parameter, which tells unpkg.com to rewrite &quot;bare&quot; module specifiers to full URLs.</p>
<h3>HTML</h3> <h3>HTML</h3>
<pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>module<span class="token punctuation">"</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://unpkg.com/my-element?module<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">></span></span></code></pre> <pre class="language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>module<span class="token punctuation">"</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://unpkg.com/my-element?module<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">></span></span></code></pre>
<h3>JavaScript</h3> <h3>JavaScript</h3>

File diff suppressed because one or more lines are too long

51903
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -41,37 +41,30 @@
"author": "Google LLC", "author": "Google LLC",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"dependencies": { "dependencies": {
"lit": "^2.1.0" "lit": "^2.2.4"
}, },
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^0.12.1", "@11ty/eleventy": "^1.0.1",
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1", "@11ty/eleventy-plugin-syntaxhighlight": "^4.0.0",
"@custom-elements-manifest/analyzer": "^0.5.7", "@custom-elements-manifest/analyzer": "^0.5.7",
"@esm-bundle/chai": "^4.1.5", "@open-wc/testing": "^3.1.5",
"@open-wc/testing": "^3.0.0-next.1", "@rollup/plugin-node-resolve": "^13.3.0",
"@open-wc/testing-karma": "^4.0.9", "@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-node-resolve": "^13.0.4", "@typescript-eslint/eslint-plugin": "^5.25.0",
"@rollup/plugin-replace": "^3.0.0", "@typescript-eslint/parser": "^5.25.0",
"@types/mocha": "^9.0.0", "@web/dev-server": "^0.1.31",
"@typescript-eslint/eslint-plugin": "^4.3.0", "@web/dev-server-legacy": "^1.0.0",
"@typescript-eslint/parser": "^4.30.0", "@web/test-runner": "^0.13.27",
"@web/dev-server": "^0.1.22", "@web/test-runner-playwright": "^0.8.8",
"@web/dev-server-legacy": "^0.1.4",
"@web/dev-server-rollup": "^0.3.9",
"@web/test-runner": "^0.13.16",
"@web/test-runner-mocha": "^0.7.4",
"@web/test-runner-playwright": "^0.8.4",
"@webcomponents/webcomponentsjs": "^2.6.0", "@webcomponents/webcomponentsjs": "^2.6.0",
"deepmerge": "^4.2.2", "eslint": "^8.15.0",
"eslint": "^7.32.0", "lit-analyzer": "^1.2.1",
"lit-analyzer": "^1.1.10", "prettier": "^2.6.2",
"mocha": "^9.1.1",
"prettier": "^2.3.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.70.2", "rollup": "^2.73.0",
"rollup-plugin-summary": "^1.2.3", "rollup-plugin-summary": "^1.4.3",
"rollup-plugin-terser": "^7.0.2", "rollup-plugin-terser": "^7.0.2",
"typescript": "^4.3.5" "typescript": "~4.6.4"
}, },
"customElements": "custom-elements.json" "customElements": "custom-elements.json"
} }