├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── 1-lit-html ├── scaffold.html └── solutions │ ├── 1-hello-world.html │ ├── 2-variables.html │ ├── 3-re-render.html │ ├── 4-render-array.html │ ├── 5-map-templates.html │ └── 6-event-listeners.html ├── 2-lit-element ├── assignments │ ├── 1-hello-world.html │ ├── 10-template-function.html │ ├── 2-fetch-first-article.html │ ├── 3-render-articles.html │ ├── 4-child-component.html │ ├── 5-read-toggle.html │ ├── 5b-upwards-data.html │ ├── 6-filter-articles.html │ ├── 7-styling.html │ ├── 8-polymer-components.html │ ├── 9-read-unread-counter.html │ ├── advanced:conditional-templates.html │ ├── advanced:directives.html │ ├── advanced:placeholder-content.html │ └── advanced:shared-styles.html └── solutions │ ├── 1-hello-world.html │ ├── 10-template-function.html │ ├── 2-fetch-first-article.html │ ├── 3-render-articles.html │ ├── 4-child-component.html │ ├── 5-read-toggle.html │ ├── 5b-upwards-data.html │ ├── 6-filter-articles.html │ ├── 7-styling.html │ ├── 8-polymer-components.html │ └── 9-read-unread-counter.html ├── README.md ├── index.html ├── package.json └── polymer-lit-cheatsheet.md /.eslintignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | node_modules/ 3 | _site/ 4 | dist/ 5 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '@open-wc/eslint-config' 4 | ].map(require.resolve), 5 | plugins: ['lit'], 6 | rules: { 7 | 'import/no-unresolved': 'off', 8 | 'class-methods-use-this': 'off', 9 | 'lit/no-duplicate-template-bindings': 'error', 10 | 'lit/no-legacy-template-syntax': 'error', 11 | 'lit/no-template-bind': 'error', 12 | 'lit/no-template-map': 'off', 13 | 'lit/no-useless-template-literals': 'error', 14 | 'lit/attribute-value-entities': 'error', 15 | 'lit/binding-positions': 'error', 16 | 'lit/no-property-change-update': 'error', 17 | 'lit/no-invalid-html': 'error', 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | node_modules -------------------------------------------------------------------------------- /1-lit-html/scaffold.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /1-lit-html/solutions/1-hello-world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /1-lit-html/solutions/2-variables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /1-lit-html/solutions/3-re-render.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /1-lit-html/solutions/4-render-array.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /1-lit-html/solutions/5-map-templates.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /1-lit-html/solutions/6-event-listeners.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /2-lit-element/assignments/1-hello-world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /2-lit-element/assignments/10-template-function.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /2-lit-element/assignments/2-fetch-first-article.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /2-lit-element/assignments/3-render-articles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /2-lit-element/assignments/4-child-component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /2-lit-element/assignments/5-read-toggle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /2-lit-element/assignments/5b-upwards-data.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /2-lit-element/assignments/6-filter-articles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /2-lit-element/assignments/7-styling.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /2-lit-element/assignments/8-polymer-components.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /2-lit-element/assignments/9-read-unread-counter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /2-lit-element/assignments/advanced:conditional-templates.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /2-lit-element/assignments/advanced:directives.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /2-lit-element/assignments/advanced:placeholder-content.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /2-lit-element/assignments/advanced:shared-styles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /2-lit-element/solutions/1-hello-world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 24 | 25 | 26 | 27 | 28 |