Skip to content

Instantly share code, notes, and snippets.

@Hypercubed
Created April 15, 2019 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hypercubed/6a2c7e5c21355bc109f0c06e6a5a62c8 to your computer and use it in GitHub Desktop.
Save Hypercubed/6a2c7e5c21355bc109f0c06e6a5a62c8 to your computer and use it in GitHub Desktop.
-/
node_modules/
package-lock.json
module.exports = {
"package_path": "./-/",
"package_root": "/-/"
}
<!doctype html>
<head>
<script src="/-/@webcomponents/webcomponentsjs@2.2.8/webcomponents-bundle.js"></script>
<script type="module" src="/-/es-module-shims@0.2.3/dist/es-module-shims.js"></script>
<script type="importmap-shim" src="/-/importmap.json"></script>
<script type="module-shim">
import { LitElement, css } from 'lit-element@2';
import { html } from 'lit-html@1';
class MyElement extends LitElement {
static get properties() {
return {
mood: {type: String}
}
}
static get styles() {
return css`.mood { color: green; }`;
}
render() {
return html`Web Components are <span class="mood">${this.mood}</span>!`;
}
}
customElements.define('my-element', MyElement);
</script>
</head>
<body>
<my-element mood="great"></my-element>
</body>
</html>
{
"name": "@swimlane/airdrop-example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"airdrop": "airdrop add es-module-shims@0.2.3 lit-element@2.1.0 lit-html@1.0.0 @webcomponents/webcomponentsjs@2.2.8 --clean"
},
"author": "",
"license": "MIT",
"devDependencies": {
"@swimlane/airdrop-cli": "^1.0.0-rc1.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment