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 3
3
Boilerplate for creating a custom element.
4
4
5
5
## Installation
6
-
6
+ Available on [ npm ] ( https://www.npmjs.com/ ) as [ ** @ github/custom-element-element ** ] ( https://www.npmjs.com/package/@github/custom-element-element ) .
7
7
```
8
- $ npm install @github/custom-element-element
8
+ $ npm install --save @github/custom-element-element
9
9
```
10
10
11
11
## Usage
12
12
13
+ ### Script
14
+
15
+ Import as ES modules:
16
+
13
17
``` js
14
18
import ' @github/custom-element-element'
15
19
```
16
20
21
+ Include with a script tag:
22
+
17
23
``` html
18
- <custom-element ></ custom -element >
24
+ <script type = " module " src = " ./node_modules/@github/ custom-element-element/dist/index.js " >
19
25
` ` `
20
26
21
27
## Browser support
22
28
23
29
Browsers without native [custom element support][support] require a [polyfill][].
24
-
25
30
- Chrome
26
31
- Firefox
27
32
- Safari
28
33
- Microsoft Edge
29
34
30
- [ support ] : https://caniuse.com/#feat= custom-elementsv1
35
+ [support]: https://caniuse.com/custom-elementsv1
31
36
[polyfill]: https://github.com/webcomponents/custom-elements
32
37
33
- ## Development
34
-
35
- ```
36
- npm install
37
- npm test
38
- ```
39
-
40
38
## License
41
39
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 37
37
"eslint-plugin-custom-elements" : " ^0.0.6" ,
38
38
"eslint-plugin-github" : " ^4.3.6" ,
39
39
"typescript" : " ^4.2.4"
40
- }
40
+ },
41
+ "customElements" : " custom-elements.json"
41
42
}
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