File tree 4 files changed +11
-16
lines changed
4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 1
- name : Publish Docs on Push to main
1
+ name : Lint on Push to main
2
2
on :
3
3
push :
4
4
branches :
Original file line number Diff line number Diff line change @@ -13,27 +13,22 @@ const commonOptions = {
13
13
'.otf' : 'file' ,
14
14
'.html' : 'copy' ,
15
15
'.json' : 'copy' ,
16
- }
16
+ } ,
17
+ logLevel : 'info' ,
17
18
} ;
18
19
19
20
if ( process . env . NODE_ENV === 'production' ) {
20
21
await esbuild . build ( {
21
22
...commonOptions ,
22
23
minify : true ,
23
24
sourcemap : false ,
24
- define : {
25
- 'process.env.NODE_ENV' : '"production"' ,
26
- } ,
27
25
} ) . catch ( ( ) => process . exit ( 1 ) ) ;
28
26
} else {
29
27
commonOptions . entryPoints . push ( 'example/index.html' , 'example/data.json' ) ;
30
28
let ctx = await esbuild . context ( {
31
29
...commonOptions ,
32
30
minify : false ,
33
31
sourcemap : true ,
34
- define : {
35
- 'process.env.NODE_ENV' : '"development"' ,
36
- } ,
37
32
} )
38
33
39
34
let { host, port } = await ctx . serve ( {
Original file line number Diff line number Diff line change 13
13
< js-container >
14
14
< js-tag transform ="uppercase "> Data</ js-tag >
15
15
<!-- where the data comes from -->
16
- < js-provider id ="provider " path ="data.json " interval ="5 "> </ js-provider >
16
+ < js-provider id ="provider " origin =" http://localhost:8080/ " path ="aktek/sync " interval ="5 "> </ js-provider >
17
17
18
18
<!-- model -->
19
19
< js-array id ="array " provider ="#provider "> </ js-array >
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export class ProviderElement extends LitElement {
120
120
121
121
#pathChanged( newVal , oldVal ) {
122
122
if ( newVal ) {
123
- if ( newVal !== oldVal ) {
123
+ if ( newVal !== oldVal ) {
124
124
this . fetch ( ) ;
125
125
}
126
126
} else {
@@ -130,7 +130,7 @@ export class ProviderElement extends LitElement {
130
130
131
131
#intervalChanged( newVal , oldVal ) {
132
132
if ( newVal ) {
133
- if ( newVal !== oldVal ) {
133
+ if ( newVal !== oldVal ) {
134
134
this . fetch ( ) ;
135
135
}
136
136
} else {
@@ -193,12 +193,12 @@ export class ProviderElement extends LitElement {
193
193
#fetchdata( data ) {
194
194
if ( typeof data == "string" ) {
195
195
this . #fetchtext( data ) ;
196
- } else if ( data instanceof Array ) {
197
- data . forEach ( ( item ) => {
198
- this . #fetchobject( data ) ;
199
- } ) ;
196
+ } else if ( Array . isArray ( data ) ) {
197
+ data . forEach ( ( item ) => {
198
+ this . #fetchobject( item ) ;
199
+ } ) ;
200
200
} else if ( data instanceof Object ) {
201
- this . #fetchobject( data ) ;
201
+ this . #fetchobject( data ) ;
202
202
} else {
203
203
this . #fetchblob( data ) ;
204
204
}
You can’t perform that action at this time.
0 commit comments