File tree 4 files changed +25
-8
lines changed
4 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta charset ="UTF-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < link rel ="stylesheet " href ="https://use.typekit.net/kes1hoh.css ">
6
7
< title > Demo</ title >
7
8
</ head >
8
9
< body >
9
10
< demo-app > </ demo-app >
10
- < script type ="module " src ="./app/app.ts "> </ script >
11
+ < script type ="module " src ="./src/ app/app.ts "> </ script >
11
12
</ body >
12
13
</ html >
Original file line number Diff line number Diff line change 4
4
"version" : " 1.0.0" ,
5
5
"license" : " Apache-2.0" ,
6
6
"private" : true ,
7
+ "type" : " module" ,
7
8
"repository" : {
8
9
"type" : " git" ,
9
10
"url" : " git+https://github.com/sanomalearning/example-design-system-lit-app.git"
12
13
"url" : " https://github.com/sanomalearning/example-design-system-lit-app/issues"
13
14
},
14
15
"homepage" : " https://github.com/sanomalearning/example-design-system-lit-app#readme" ,
15
- "main" : " index.js" ,
16
- "type" : " module" ,
17
16
"scripts" : {
18
17
"start" : " wireit"
19
18
},
Original file line number Diff line number Diff line change 1
- import { html , LitElement , TemplateResult } from 'lit' ;
1
+ import type { ScopedElementsMap } from '@open-wc/scoped-elements' ;
2
+ import type { CSSResultGroup , TemplateResult } from 'lit' ;
3
+ import { ScopedElementsMixin } from '@open-wc/scoped-elements' ;
4
+ import { Button } from '@sanomalearning/slds-core/button' ;
5
+ import { css , html , LitElement } from 'lit' ;
6
+
7
+ export class App extends ScopedElementsMixin ( LitElement ) {
8
+ static get scopedElements ( ) : ScopedElementsMap {
9
+ return {
10
+ 'sl-button' : Button
11
+ } ;
12
+ }
13
+
14
+ static styles : CSSResultGroup = css `
15
+ :host { display: block; }
16
+ ` ;
2
17
3
- export class App extends LitElement {
4
18
render ( ) : TemplateResult {
5
- return html `HELLO WORLD!` ;
19
+ return html `
20
+ < h1 > Sanoma Learning Design System Demo App</ h1 >
21
+ < h2 > Using < a href ="https://lit.dev "> Lit</ a > </ h2 >
22
+ < sl-button > Button</ sl-button >
23
+ ` ;
6
24
}
7
25
}
8
26
Original file line number Diff line number Diff line change 1
1
import { esbuildPlugin } from '@web/dev-server-esbuild' ;
2
2
3
3
export default {
4
+ appIndex : './index.html' ,
4
5
nodeResolve : {
5
6
exportConditions : [ 'development' ]
6
7
} ,
7
- appIndex : './src/index.html' ,
8
- rootDir : 'src' ,
9
8
plugins : [ esbuildPlugin ( { ts : true , target : 'auto' } ) ]
10
9
} ;
You can’t perform that action at this time.
0 commit comments