File tree Expand file tree Collapse file tree 4 files changed +21
-14
lines changed
Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 33Boilerplate for creating a custom element.
44
55## Installation
6-
6+ Available on [ npm ] ( https://www.npmjs.com/ ) as [ ** @ github/custom-element-element ** ] ( https://www.npmjs.com/package/@github/custom-element-element ) .
77```
8- $ npm install @github/custom-element-element
8+ $ npm install --save @github/custom-element-element
99```
1010
1111## Usage
1212
13+ ### Script
14+
15+ Import as ES modules:
16+
1317``` js
1418import ' @github/custom-element-element'
1519```
1620
21+ Include with a script tag:
22+
1723``` html
18- <custom-element ></ custom -element >
24+ <script type = " module " src = " ./node_modules/@github/ custom-element-element/dist/index.js " >
1925` ` `
2026
2127## Browser support
2228
2329Browsers without native [custom element support][support] require a [polyfill][].
24-
2530- Chrome
2631- Firefox
2732- Safari
2833- Microsoft Edge
2934
30- [ support ] : https://caniuse.com/#feat= custom-elementsv1
35+ [support]: https://caniuse.com/custom-elementsv1
3136[polyfill]: https://github.com/webcomponents/custom-elements
3237
33- ## Development
34-
35- ```
36- npm install
37- npm test
38- ```
39-
4038## License
4139
42- Distributed under the MIT license. See LICENSE for details.
40+ Distributed under the MIT license. See LICENSE for details.
Original file line number Diff line number Diff line change 1+ {
2+ "schemaVersion" : " 1.0.0" ,
3+ "readme" : " " ,
4+ "modules" : []
5+ }
Original file line number Diff line number Diff line change 3737 "eslint-plugin-custom-elements" : " ^0.0.6" ,
3838 "eslint-plugin-github" : " ^4.3.6" ,
3939 "typescript" : " ^4.2.4"
40- }
40+ },
41+ "customElements" : " custom-elements.json"
4142}
Original file line number Diff line number Diff line change 1+ {
2+ "tags" : []
3+ }
You can’t perform that action at this time.
0 commit comments